Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

AutoNumber but when printing...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chadfran - 25 Jan 2006 18:57 GMT
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
Greg - 25 Jan 2006 19:30 GMT
See:
http://gregmaxey.mvps.org/Print_Numbered_Copies.htm
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.