![]() |
|
|
|
#1
|
|||
|
|||
|
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
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
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"
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to copy userform text and formfield contents to outlook? | odin | Word VBA | 7 | 09-09-2014 11:56 AM |
Is it possible to take an input from a UserForm in one document to a UserForm in a do
|
BoringDavid | Word VBA | 5 | 05-09-2014 09:08 AM |
| cross reference hyperlinks to text box | nothing_kills | Word | 4 | 11-25-2013 09:21 AM |
Inserting Text and Hyperlinks
|
DrDOS | Excel | 2 | 03-21-2012 03:53 AM |
Checkbox on Userform result in Text in Word
|
Dolfie_twee | Word VBA | 1 | 06-22-2010 07:54 AM |