Create a new MS Word document

marup

New Member
Hi,

I have had a deep look into using ActiveX to open MS Word.
It works fine, BUT...
How does one create a new MS Word document?
If anyone out there knows the proper syntax, please help.

Best Regards

/Peter
 
For using OLE commands there is a good example of this on the www.dotr.com website.

But simply to open an existing word document you need the following commands:

DEF VAR chWordApplication AS COM-HANDLE NO-UNDO.
create "Word.Application" chWordApplication.
chwordapplication:visible = true.
chWordApplication:Documents:Add("c:\adr.doc", 0). /* where adr.doc is your document name! */

To open an empty word document you need the following commands:

DEF VAR chWordApplication AS COM-HANDLE NO-UNDO.
create "Word.Application" chWordApplication.
chwordapplication:visible = true.
chWordApplication:Documents:Add().

Regards
 

dancar

Member
create ms word

Try the simplest means possible; a progress 4gl statement:
/* forget the complexities with active X for this */

Assumming Windows.
/* VIA PROGRESS EDITOR TRY THE FOLLOWING */

RUN dos your_path\Program Files\Microsoft ~ Office\Office\WinWord value(your_file_name.doc) .

this is an over simplification of the path and application statement, but it will work.

Check with the MS windows Start + Run for the actual path to WinWord via your system.

Too, set your_file_name variable. Could do the same for the path.

dc
 
Top