![]() |
#1
|
|||
|
|||
![]()
I have come across a major issue with a VBA I am working on. I have been working on this project as a document file, but when I save it as a macro-enabled template (.dotm) , it screws up the fields (MergeFields) when creating a new document. Example, the header of the document has address fields:
«primary_name» «primary_address» «primary_city» ...etc. «primary_contactname»: but when the document is saved as a template file and a new document is created from that template, many of the fields are replaced by the user first name field (another MergeField used later in the document), and the city field has an extra opening tag (so it doesn't get replaced in the VBA code): «user_first_name» «user_first_name» ««primary_city» ...etc. «user_first_name»: I have tried deleting and replacing the fields, and the problem still persists. I even deleted the "user_first_name" field in the only place it existed in the document, and the fields are still replaced by it, even if it isn't in use anywhere else. Can anyone explain why this is happening? If I open the template via the file open in the Word application, then it opens fine, but if I open it by double clicking the file icon, the fields are wrong. How can this be fixed? |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
TechEd | Word | 3 | 06-09-2014 07:22 PM |
![]() |
Nurse2014 | Word | 2 | 08-18-2013 01:22 PM |
Protected Fields in a document template | augurswelljan | Word | 3 | 05-01-2012 04:45 AM |
Creating a new template for existing document? | Stephen0352 | Word | 6 | 09-12-2011 09:00 AM |
Creating document from template but macros are still linked to template | webharvest | Word | 0 | 07-16-2011 09:34 AM |