Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running Word 6, 7, or 8???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00173965
Message ID:
00177521
Vues:
46
>oWordBasic.fileNew('Template.dot')
>
>I.e. you must call using parentheses and arguments rather than the 'named arguments' syntax you are trying to use.
>
>
>
>===================================
>This will not work:
>
> oWordBasic = CREATEOBJECT('Word.Basic')
> oWordBasic.Appshow
> oWordBasic.FileNew.Template = 'TEMPLATE.DOT'
>
> The following error occurs:
> FileNew does not evaluate to an object member.
>
> If you look in WordBasic it should be something like this:
>
> FileNew .Template = 'TEMPLATE.DOT'
>
> How do you call this func from VFP5???
>
> /Magnus

Ok this works fine now, but Word will not stay open after I've done all
the bookmark insert. It just closes on me. The only way I can get it to stay
open is if I start Word firts.
Any ideas???

The code:

oWordBasic = CREATEOBJECT('Word.Basic')
oWordBasic.Appshow
oWordBasic.FileNew('TEMPLATE.DOT')
IF oWordBasic.ExistingBokkmark('Bookmark') <> 0
oWordBasic.EditGoTo('Bookmark')
oWordBasic.Insert('Test')
ENDIF

* End of code and Procedure and word closes

/Magnus
Magnus Nordin
VFP MCP

"We have tested the GUI on 5-year olds. Why? Beacuse they aren't braindead!"
Michael Spindler, Apple

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform