Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-18-2014, 09:25 AM
odin odin is offline RichTextContentControl with text and hyperlinks via Userform possible? Windows 7 64bit RichTextContentControl with text and hyperlinks via Userform possible? Office 2010 64bit
Novice
RichTextContentControl with text and hyperlinks via Userform possible?
 
Join Date: Sep 2014
Posts: 11
odin is on a distinguished road
Default

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?
Reply With Quote
Reply



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
RichTextContentControl with text and hyperlinks via Userform possible? 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
RichTextContentControl with text and hyperlinks via Userform possible? Inserting Text and Hyperlinks DrDOS Excel 2 03-21-2012 03:53 AM
RichTextContentControl with text and hyperlinks via Userform possible? Checkbox on Userform result in Text in Word Dolfie_twee Word VBA 1 06-22-2010 07:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:45 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft