Help Please with OLE Microsoft Word

Help Please with OLE Microsoft Word

Postby xProgrammer » Wed May 23, 2007 10:09 am

I want to control Word to open Word documents and convert to text format.

I can get the Application object

hWordOle := CreateOleObject("Word.Application")

I can get a ?handle? to the Documents Property

hWordDocs := OleGetProprty( hWordOle, "Documents" )

I can use this to open a file

OleInvoke( hWordDocs, "Open", "d:\pretend\MyDoc.doc" )

I can get a ?handle? to the FileConverters property ( a collection )

ahFileCons := OleGetProperty( hWordOle, "FileConverters" )

but I need to access the mebers of that collection somehow. I don't know how to proceed. I need something like an OleGetPropertyCollection() function.

I need to set the required file converter and then invoke the Save method.

Can anyone help please?

By the way are these Ole functions documented anywhere?

Thanks
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Making Progress

Postby xProgrammer » Wed May 23, 2007 12:16 pm

I am making progress using

oWord := CREATEOBJECT( "Word.Application" )

then I can find

LEN( oWord:FileConverters )

And iterate through

oWord:FileConverters[liCount]:FormatName

CREATEOBJECT() is undocumented in latest xHarbour documentation as is ToleAuto which might be another approach.

Is there any info out there?

Any opinions as to the best approach?

I am both excited by what xHarbour / Five Win can do and frustrated by the lag of documentation (understandable though it probably is given relatively small user base).
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Postby RAMESHBABU » Wed May 23, 2007 2:24 pm

Follow this link. You will get some help

http://fivetechsoft.com/forums/viewtopic.php?t=2503


- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 43 guests