>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,1562Specifically:
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)