C
chadfran
I have this macro that adds a Autonumber to a word template file but instead
I'd like it so that it increases the number ever time I print. So lets say I
print the document 50 times. The document will get spit out with the number 1
- 50 on it. Is this possiable?
Sub AutoNew()
Order = System.PrivateProfileString("C:\Settings.Txt", "MacroSettings",
"Order")
If Order = "" Then
Order = 1
Else
Order = Order + 1
End If
System.PrivateProfileString("C:\Settings.txt", "MacroSettings", "Order") =
Order
ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "00#")
ActiveDocument.SaveAs FileName:="path" & Format(Order, "00#")
End Sub
I'd like it so that it increases the number ever time I print. So lets say I
print the document 50 times. The document will get spit out with the number 1
- 50 on it. Is this possiable?
Sub AutoNew()
Order = System.PrivateProfileString("C:\Settings.Txt", "MacroSettings",
"Order")
If Order = "" Then
Order = 1
Else
Order = Order + 1
End If
System.PrivateProfileString("C:\Settings.txt", "MacroSettings", "Order") =
Order
ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "00#")
ActiveDocument.SaveAs FileName:="path" & Format(Order, "00#")
End Sub