Question : Wanted to open a new word document through OLE

A main application being an ERP, we could open Word2000 application. However, we are unsuccessful to create a new document for word applciation.

We tried this code to open new document  -----  word.application.documents.newdocument

         &WORD = CreateObject("Word.Application");
         ObjectSetProperty(&WORD, "Visible", True);
         ObjectDoMethod(&WORD, "Documents.NewDocument", "");

Many thanks if a solution can be suggested.

Answer : Wanted to open a new word document through OLE

Sorry, can't help you much with that because I'm not that familiar with the language.

But it looks to me, that ObjectDoMethod (&DOCUMENT,"Find") should no be necessary, since you use ReplaceAll. But that's just another guess.
Random Solutions  
 
programming4us programming4us