Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OWord goto
Message
From
29/09/2006 19:46:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
29/09/2006 19:19:02
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
01158319
Message ID:
01158325
Views:
31
>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)
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform