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

Click here to load this message in the networking platform