General information
Category:
COM/DCOM and OLE Automation
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only