Ok...I've got pretty much everythings setup but I can't seem to get the hyperlink portion of the code to work. I've tried it a few ways but I keep getting an error.
Compil error:
Expected: end of statement
Tried this:
Code:
.Cell(webIndex + 1, 3).Range.End -1 = ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:=oObjForm.webaddTextBox.Text, _
SubAddress:="", ScreenTip:="", TextToDisplay:=oObjForm.dspTextBox.Text
Also Tried this:
Code:
webText = ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:=oObjForm.webaddTextBox.Text, _
SubAddress:="", ScreenTip:="", TextToDisplay:=oObjForm.dspTextBox.Text
.Cell(webIndex + 1, 3).Range.End -1 = webText
If I have the following by itself to run as alone it'll make the hyperlink and no errors:
Code:
Sub insertLink()
Dim dspTxt As String
Dim webTxt As String
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
"http://www.microsoft.com", SubAddress:="", ScreenTip:="", TextToDisplay:="Testing Link"
I am at a loss as of now. Any ideas?