View Single Post
  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Assuming you are using VBA to execute the merge and save the output, you can
use e.g.

ActiveDocument.MailMerge.DataSource.DataFields("my pathname").Value

to get the value of a field called "mypathname" in the currently loaded
data source record.

Peter Jamieson



"tom blower" wrote in message
om...
Merge uses data from a rtf file. I need to be able to get code to
extract data from one of the fields in the rtf file, which contains
the path and file name to be used when saving the merge result. I do
not want to have to hard-code this which is the easy solution.

Could someone kindly tell me if this is possible and (if so) how to
achieve it?

Access slots the designated path and file name into one of the fields
in the table which is then output as a rtf file followed by code to
start Word and run the merge in the selected template, which is linked
to the rtf file.

Thanks

Tom