Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-19-2014, 03:23 AM
Benble Benble is offline Convert html links into embedded hyperlinks Windows 7 32bit Convert html links into embedded hyperlinks Office 2010 32bit
Novice
 
Join Date: Apr 2014
Posts: 12
Benble is on a distinguished road
Default Regarding the topic Convert html links into embedded hyperlinks

Hi Paul!

Maybe I was little too quick to say that the proposed functions works for me. I did not actually tested the hyperlinks that where created in the Word document. I was really so happy to see that the code could be executed and the "human-friendly" links turned up. I have been using your first proposal (not the simplified one). I also realized the “target=_blank” is not needed in the HTML link. It was much easier to customize your function (also added ScreenTips):

StrSreenTip = Replace(StrTxt, "Link to ", "Click here to go to ", 1, -1, vbTextCompare)
If StrTxt <> "" Then


.Hyperlinks.Add Anchor:=RngTmp, Address:=StrTmp, TextToDisplay:=StrTxt, ScreenTip:=StrSreenTip, Target:="_blank"
Else
.Hyperlinks.Add Anchor:=RngTmp, Address:=StrTmp, ScreenTip:="Click here to go the Web Publication", Target:="_blank"
End If
.Find.Execute

I am not an VBA and Word expert so this could probably being fixed in a much better VBA coding, but I will use this for now…

Thanks again Paul!
before.jpg

after.jpg

error in hyperlink.jpg

link properties.jpg

Kind Regards

Benble
Reply With Quote
Reply

Tags
a href, hyperlink, macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert html links into embedded hyperlinks Embedded links spheon Word 1 06-07-2011 04:11 PM
convert html to text at opening etfjr Word 0 12-13-2010 11:14 AM
Can you actually write HTML and CSS in a word document and send it as an html page jackaroo Word 0 07-12-2010 07:49 AM
Word with frames, table of contents, and hyperlinks to html NHMC Word 0 12-09-2009 12:54 PM
Convert a file from HTML to WORD format weblayout view gtselvam Word 0 12-02-2008 03:53 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:34 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