> 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
[quoted text clipped - 12 lines]
>
> Tom
Thanks Peter. I wish I could understand the Word object library.
Yes, I am controlling the merge with VBA. I have also found another
way of dealing with this.
Within Access,
>objWord.ActiveDocument.Variables.Add.Name:="VariableName",
Value:="Whatever"
inserted on the line before
>objWord.Run "'ActiveDocument' !Module1.MergeIt"
which starts Word
Within Word
>ActiveDocument.SaveAs
FileName:=ActiveDocument.Variables("VariableName").Value, etc
Since I am already putting the required data into the rtf file and
your neat code is all that is required in each template module, I
will adopt your solution. Many thanks.
Tom