>I have a Word test.doc set up as a merge document
>with link to table (with 1 record only) for merge
>data. I can open the document using the code below:
>
loword=createobject("word.Application")
loword.visible=.T.
loword.documents.open("c:\ipletters\test.doc")
>
>but would like to insert code to automatically merge
>the document as per a macro. Any suggestions?
I'd suggest reading Della and Tamar's book from Hentzenwerke about Office Automation. :-)
Also, there is an article on the subject at MSKB#
Q181926. If you search around a bit, you might be able to find more on the site.
>Also: is the above code WordBasic? If so, where can I find a language lexicon?
It looks more like Visual Basic for Applications (VBA) to me. The Word help file should get you going in the right direction, if you installed the programming help files with your original install, in addition to the normal help files.