Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OWord goto
Message
De
29/09/2006 19:46:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
29/09/2006 19:19:02
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
01158319
Message ID:
01158325
Vues:
32
>Can someone tell me how the following command would translate into VFP?
>
>
>oWord.Selection.Goto wdGoToBookmark, Name:="DTotal"
>
>
>Thanks

I am not sure about the details in this specific case, but I recommend you take a look at my article on Excel Automation - http://www.utmag.com/wconnect/wc.dll?9,7,10,1562

Specifically:
  • You need an object reference in Visual FoxPro. Perhaps you have it already.
  • Visual FoxPro doesn't understand "parameters by name", only "parameters by position". Fortunately, the commands (in this case, Goto) have an alternate syntax, which provides parameters by position. Look it up in the help (pressing F1 in the macro editor), or simply provide the parameters in the same order, this should usually work.
  • Constants like wdGoToBookmark are not understood by Visual FoxPro, until you include a list of #DEFINEs. Search the download section for Word constants.
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Précédent
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform