Unfortunately, Cetin's advice won't work as I have a memo field and that does not get exported to the text file properly.
What I have done for now is set up a Word template with some bookmarks, then create a new document based on this template, replace all the bookmarks with the appropriate values, copy the entire document and paste it into a master document. Then repeat the above for each row in the table.
Thanks for your help.
>Frank,
>
>First, see Cetin' advice. It may be the easiest solution for you.
>
>If you are talking about how to add a bookmark, then you may use something like:
>
>
>with oWOrd.ActiveDocument
> .Bookmarks.Add("TAble1",.Tables(1).Range)
> .Bookmarks.Add("Row2",.Tables(1).Rows(2).Range)
>...
>
>
>
>As for concatenate documents, then there could be different technics depending on the document content and on what you need to add/insert from another document. The Word Macros may help you to record the VB code. Then you can convert it to VFP.
>
>
>>Yuri,
>>
>>as I'm having such a hard time with the mailmerge (and was also thinking that I'll need to ensure the OLE DB Jet or whatever it's called exists on the target PCs) I thought I'd try it just using automation and bookmarks.
>>
>>I've got a document which has the bookmarks in and am able to get it to work for one record in a table. What I need to do now is do this for multiple records in a table and then concatenate the separate documents into one document ensuring there is a page break between each "document". Have you any idea how I can achieve this?