Help Please with OLE Microsoft Word
Posted: 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
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