The code you posted requires the document to have a Custom Document Property named "Counter" and a DOCPROPERTY field referencing that Custom Document Property. Does your document have both?
For some alternative approaches, see:
https://www.msofficeforums.com/word-...html#post13162
https://www.msofficeforums.com/word-...html#post34477
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|