Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP to Word syntax to add hyperlink
Message
From
06/02/2001 15:07:07
 
 
To
06/02/2001 14:23:28
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00473059
Message ID:
00473120
Views:
35
Thank-You very much. As a friend of mine would say "You da man". I saved the range to a variable and then sut that in the hyperlink statement and it works great.

Thanks again,

Earl


>Then you're not sending a valid Range. You have to create a range object and then pass that. Selection.Range means nothing coming from VFP. Lets say you wanted the contents of Cell 1,1 in Table 1 as the range:
>
>oDoc=oWordObj.ActiveDocument
>oTab=oDoc.Tables(1)
>oCellRange=oTab.Cell(1,1).Range
>
>See?
>
>
>>I tried it with and without the quotes. The error message is alias not found. If I leave off selection and only have range I get variable range not found.
>>
>>Thanks for the suggestion
>>
>>>Quick fix: Take the quotes off of "selection.range" and make it a selection object.
>>>
>>>>
>>>>I am trying to create a table in word that will have links to various documents created in my VFP database. The table and all of the information is no problem. Where I am having trouble is getting the correct syntax for establishing the hyperlink. I ran a macro to get the basics and where I am getting hung up is on the anchor. The following is what I have tried:
>>>>
>>>>oWordObj.ActiveDocument.HyperLinks.Add("selection.range","test","","","test1")
>>>>
>>>>I get a data type mismatch the best I can figure it is with the "selection.range" does anyone know the correct systax.
>>>>
>>>>Thanks
>>>>Earl
Previous
Reply
Map
View

Click here to load this message in the networking platform