Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
 
Posts: n/a
Default How to get all mail merge fields in a document

I am using COM automation and WordBasic to drive Word from another
application.
I have Word templates defined with mail merge fields in them.
I am trying to open one of my Word templates and ask it for all the
mail merge fields in it.
I am doing this because I want to build the data source file on the
fly.
I want to create a single record in the data source and have in it only
the fields required for the current template.
My problem is that I cant find a function which will return me all the
mail merge field names in a document.
I previously tried using bookmarks instead of mail merge fields and
this worked fine. I could ask the document for all its bookmarks and
then get the data transferred across from my app to Word for just the
bookmarks defined in the document.
Does anyone know of a function which will give me the names of all mail
merge fields in a document ?
The function MergeFieldName$(1) will get me the first mail merge field
name in a data source file but not in a document file.
Thanks

 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mail merge and text form fields Miss Su Mailmerge 1 February 4th 06 09:29 PM
page number printing on a merged report Print Page # On Merged Report Mailmerge 6 October 17th 05 05:18 AM
How do I make footnote numners static in a mail merge document? Heather Mailmerge 5 October 14th 05 04:59 AM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
I can't get a mail merge document to open, I get "the document na. hask104 Mailmerge 0 March 31st 05 01:57 AM


All times are GMT +1. The time now is 03:22 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"