Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ole failure with Word
Message
 
À
12/12/2001 06:36:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00593151
Message ID:
00593764
Vues:
23
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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform