Enter your email address:

Delivered by FeedBurner



Use your pdf converter to make your pdf files easy! You can now buy software that makes converting pdf to doc possible! Did you know you can even convert pdf to word?
Home Page

Bloglines

1906
CelebrateStadium
2006


OfficeZealot

Scobleizer

TechRepublic

AskWoody

SpyJournal












Subscribe here
Add to My Yahoo!
This page is powered by Blogger. Isn't yours?

Host your Web site with PureHost!

 


eXTReMe Tracker
  Web http://www.klippert.com



  Saturday, March 19, 2005 – Permalink –

WORD




AutoNumber Invoices


Creating sequentially numbered documents


Use an Autonew macro to add a sequential number to a document and save it with that number.


In the template from which you create the document, insert a bookmark named Order in the location where you want the sequential number to appear and create an AutoNew macro, as follows:


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



If you do not need to display the number in the document, but just want to save it with a sequential number, there is no need to create the bookmark in the template and you should then delete the second last line of the code.

Article contributed by Doug Robbins
Word MVP Site


Microsoft Knowledgebase:
Macro to Increment Invoice Number to New Form Document


WordTips:
Sequentially numbered Labels


Here's a further discussion including methods to create sequential ticket numbers:

PCPlus.co.uk:
Look down the page for Numbering tickets


Here's the PDF version:
Word Field Codes Revealed




See all Topics


<Doug Klippert@ 6:57 AM

Comments: Post a Comment

Links to this post:

Create a Link