Sequentially Numbered Documents

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to print a sequentially numbered document and have created the bookmark & macro referred to in other posts from the mvps site, http://word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm, but I just get number 001 on each page. How can I get it to print 001, 002, 003, ect.? I copied and pasted the string, but something must be wrong. Help appreciated. Thanks Bil

Sub AutoNew(

Order = System.PrivateProfileString("C:\Settings.Txt",
"MacroSettings", "Order"

If Order = "" The
Order =
Els
Order = Order +
End I

System.PrivateProfileString("C:\Settings.txt", "MacroSettings",
"Order") = Orde

ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "00#"
ActiveDocument.SaveAs FileName:="path" & Format(Order, "00#"

End Sub
 
Bonjour,

Dans son message, notre ami < Bill > nous laissait savoir que :
In this message, our friend < Bill > informed us that:


|| I am trying to print a sequentially numbered document and have created
the bookmark & macro
|| referred to in other posts from the mvps site,
|| http://word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm, but I just get number
001 on each page. How
|| can I get it to print 001, 002, 003, ect.? I copied and pasted the
string, but something must
|| be wrong. Help appreciated. Thanks Bill

Do you mean that the page with the sequential number in every document
created is numbered 001 or that in one document where you want many
sequentially numbered pages, each one is numbered 001?

||
|| 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

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
Thank you for responding, I figured out I made a mistake. Each file was given a new name and number, which is good , but not what I wanted. Another link provided a macro for numbering the same page sequentially when printing. Thank you for responding. Bill
 
Back
Top