You need to use WordBasic to open the file, I think:
* open with autoConversion, readWrite, don't add to MRU
this.wordbasic.fileOpen(theFileName, 0,0,0)
>Chaps
>This is typical, how often to you test your apps in the office only to get them on site and start having problems.
>
>We have a handful of client sites which get problems when using ole to bring up word. Typically W95/W98 machines running Word 97. Yep I know, but you know what customers are like at upgrading. We also have one instance of a W2000 + Office 2000 machine though.
>
>Have a look at this code snipet, why then would we get the following error on some machines
>
>Error:
>"Ole Error" Ole idispatch exception code from Microsoft Word the open method or property is not available because the current selection is not in the main document Window"
>
>What causes this, I suspect its not the code but HW related.
>
>oWord=CREATEOBJECT("word.Application")
>IF TYPE('oWord') = 'O'
> oWord.visible=.t.
> oWord.Windowstate = 2
> oWord.documents.Open ("c:\temp\infile")
> oWord.Windowstate = 1
> oWord.WordBasic.FileSaveAs ("c:\temp\outfile", 0)
>ENDIF
>
>Any ideas?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only