I have been asked whether it is possible to build in an incrementing number into a Work Permit form that has been designed by somebody else.
I have decided to turn the file into a template (attached as a .doc) and use the file properties to hold the last issued number which I am incrementing whenever a new file is produced from the template. This approach is currently working well apart from 2 issues I would appreciate some help with:
1. I would like the document created to be saved in the same directory as the template. The ChDir statement I am currently using is not working.
2. At the moment if I try to create a new document from an existing document the Document_New event in the template is triggered. Can I stop this becuase I only want documents created by the template itself to increment the number, I have tried using “ActiveDocument.BuiltInDocumentProperties(wdPropertyKeywords).Value” as a test but this doesn’t work.
This is my first ever attempt at writing VBA for Word. As such I expect my problem my lie in the lack of knowledge I have on the object model.
Any and all help is appreciated,