Message 1 of 12
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys,
I need to fill my drawing's title block with the following, which will be the document number:
XXXX.XXX.XXX.<Number of Sheets><Sheet Number>
However, both numbers must have a leading zero (for example 0501, meaning 5 sheets and I'm currently looking at sheet 1).
I have spent a couple of hours looking for any solution to this and ended making the following iLogic code, which I expected to be useful somehow. But I have no idea how to sync this with my document number. Is this the best way to proceed? Can anyone help?
Dim oSheet As Sheet Dim SheetNumber As Double For Each oSheet In ThisApplication.ActiveDocument.Sheets SheetNumber = Mid(oSheet.Name, InStr(1, oSheet.Name, ":") + 1) MessageBox.Show(Microsoft.VisualBasic.Strings.Format(SheetNumber,"0#"), oSheet.Name) Next
Solved! Go to Solution.