Hi,
I'm very new to macro;s, and I need to create a macro that runs when a document is printed. The macro should increment a form field in a word document. However I haven't a clue how to do this.
So far the VBA for the macro looks like this:
Can anyone help?
Thanks in advance
Julie
I'm very new to macro;s, and I need to create a macro that runs when a document is printed. The macro should increment a form field in a word document. However I haven't a clue how to do this.
So far the VBA for the macro looks like this:
Code:
Sub ReferenceCounter()
'
' ReferenceCounter Macro
' Macro created 23/08/05 by Any Authorised User
'
If ActiveDocument.FormFields("Text94").Result >= 1 Then ActiveDocument.FormFields("Text94") = ActiveDocument.FormFields("Text94").Result + 1
Else
ActiveDocument.FormFields("Text94") = 0
End Sub
Can anyone help?
Thanks in advance
Julie