09-03-2008 02:48 PM
I'm having a problem where the mail merge fields (<Company> in particular) won't process when inserted in the header or footer of a document in Word 2007.
We have created an .adt file that when loaded from Act! Premium 2008 pops up a form for users to fill in information. When they click okay, the fields from this form are populated through the document and also some of the standard mail merge fields from the Act! add-on are also inserted in the document. They all work through the document, except in the header section of each page.
Has anyone run across this or know of any workarounds to make this work?
Is there a way to programatically refer to these mailmerge fields in the visual basic editor? If so, I could put a bookmark in the header and have the macro language replace the bookmark with the <Company> field value.
09-03-2008 04:08 PM
09-04-2008 11:27 AM
That's actually not entirely true. You can insert them in the header/footer. When you open the template from Act!, the field still shows as <Company> (or whatever field you inserted). However, if you double click the header section, then select the field and hit F9, it updates the field with the correct information.
I would like to figure out a way to do this process via a visual basic script. So far I haven't found a way to do this.
If anyone knows of a way to do the above steps programatically, I'd be interested. Thanks.
Also, FYI, there's a setting in Word 2007 (Office button > Word Options > Display > Update fields before printing) that will update the fields before printing. With this option checked, you don't have to double click the header, select the text and hit F9 to update the field info as long as you're printing the document.
The problem with this way is that if you want to email a document, the field stays as <Company> if you don't update it manually.