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
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05