Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ole failure with Word
Message
 
To
12/12/2001 06:36:49
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00593151
Message ID:
00593764
Views:
21
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
Map
View

Click here to load this message in the networking platform