View Single Post
 
Old 09-18-2014, 10:39 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

It is difficult to help you without seeing the full code. For example, you posted:

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"
and claim it works. It won't work as it will result in a compile error expecting End Sub. Now that is obvious. However, I tried:

Code:
.Cell(webIndex + 1, 3).Range.End -1 = ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:=oObjForm.webaddTextBox.Text, _
        SubAddress:="", ScreenTip:="", TextToDisplay:=oObjForm.dspTextBox.Text
is not obvious and neither is the other cryptic code segment.

What is your full code?
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote