OLE in Progress

grinder

Member
Hello everybody,

does anyone of you know a good documentation about the usage of OLE (especially WinWord)?? I think about opening documents and formatting them.


greetz
grinder
 

lloydt

New Member
This is an oldie but a goodie http://www.oehive.org/node/467 but not sure about how it does anything with winword.

I'm guessing you should be able to find some doc on the winword api, but here's some code that will open a file and then close it in winword.

DEF VAR hWord AS COM-HANDLE NO-UNDO.
DEF VAR hDoc AS COM-HANDLE NO-UNDO.
CREATE 'Word.Application' hWord.
hWord:Visible = TRUE.
hDoc = hWord:Documents:OPEN("somefile.doc").
MESSAGE "wait" VIEW-AS ALERT-BOX.
hdoc:CLOSE(NO).
hword:QUIT().
RELEASE OBJECT hDoc.
RELEASE OBJECT hWord.

Regards
--LT
 
Top