View Single Post
 
Old 06-26-2019, 04:11 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

For Word, I would put a linked content control into the footers and then the code could simply change that document property before each print. Put in a linked CC by going Insert > Quick Parts > Document Property > Subject (for example)

Code:
Sub PrintABunch_Word()
  Dim i As Long, sFoot as string
  sFoot = "ABC0300219"
  For i = 1 To 200
    ActiveDocument.BuiltInDocumentProperty("Subject") = sFoot & Format(i, "000")
    ActiveDocument.PrintOut
  Next i
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote