Community
Showing results for 
Search instead for 
Do you mean 
Reply

Mail merge fields not working in header/footer section of Word 2007

Copper Contributor
Posts: 77
Country: United States

Mail merge fields not working in header/footer section of Word 2007

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.

 

  

Platinum Elite Contributor
Posts: 6,662
Country: USA

Re: Mail merge fields not working in header/footer section of Word 2007

Not an option. Database fields can't be used in the header or footer of a Word document.
Roy Laudenslager
ACT! Certified Consultant
ACT! Report Expert
Durkin Impact Report Designer
www.techbenders.com
royel@techbenders.com
541-343-8129
Copper Contributor
Posts: 77
Country: United States

Re: Mail merge fields not working in header/footer section of Word 2007

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.