Hello, I am trying to automate the insertion of several values I parsed from a webpage using COM (probably the most reliable way to get this working on several machines, at least I hope so).
I tried the following:
Code:
word := COM_ActiveXObject("Word.Application")
COM_Invoke(word, "visible=", "true")
COM_Invoke(word, "Open", "c:\test.dot")
The "visible" part works. The Open Method doesn't get called, I suspect it is because the visible method is not part of the Word.Application Object, but a sub-object called documents. The vbscript equivalent I would be calling here is:
Code:
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("c:\scripts\inventory.doc")
Can somebody help me out here, how I would get the handler for the documents object so I can call the method ?
I suspect I would have to do something with COM_Queryinterface and maybe use the IID of the document object ? If so, how do I get the ID ?
Thanks alot !