I want to insert a field into a Word document that contains a number that automatically increments by 1 for every page printed.

I want to insert a field into a Word document that contains a number that automatically increments by 1 for every page printed.

Please see the attached Doc914.doc for details.

Could you please advise.

Thanks!
Doc914.doc
EEuser5551212Asked:
Who is Participating?
 
GrahamSkanRetiredCommented:
Do you mean every time the document is printed?

Without mail merge, you would have to use VBA and it couldn't be made completely rigorous.

Simply you could have a VBA macro and a bookmark.

Select the "1" in Sheet 1 of 50 and add a bookmark called, say, PrintCount.
Then run this Macro:
Sub PrintCopies()
    Dim i As Integer
    Dim rng As Range
    
    i = Val(ActiveDocument.Bookmarks("PrintCount").Range.Text)
    Do Until i > 50
        ActiveDocument.PrintOut
        i = i + 1
        Set rng = ActiveDocument.Bookmarks("PrintCount").Range
        rng.Text = CStr(i)
        ActiveDocument.Bookmarks.Add "PrintCount", rng 're-add bookmark
    Loop
    
End Sub

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.