I am using the following code, which works! However, I am trying to do a couple of extra things that I can't get to work.
* DWJ 06/29/1998 Create word application object
oWord = createobject('word.application')
* DWJ 06/29/1998 Load merge document
oWord.documents.open("c:\apo\documents\cancellation.doc")
* DWJ 06/29/1998 Perform merge
oWord.activedocument.mailmerge.execute
* DWJ 06/29/1998 Display word window
oWord.application.visible = .t.
I would like to maximize the Word application window when it is displayed. There is a property called WindowState that can be assigned a value to maximize, minimize, etc. The command line:
oWord.application.WindowState = 1
maximizes the window but hides all menus and toolbars. How do I maximize the window and keep the menus and toolbars.
Also, I would like to perform the merge to a separate document, save the document, close the original merge document, open the new document befor the Word window is made visible. How?