AutoNumber but when printing...

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top