I want to add a subroutine into my Word 2007 macro that will take the text and address for an embedded link in a document, and convert it to an href tag that uses the text as the display text, and the address for the HTML address.
So a line that appears as “go here to get to google” with a blue underline, and when clicked goes to http://www.google.com, gets replaced with:
<a target="_blank" href="http://www.google.com">go here to get to google</a>
This routine is to be added to an existing macro that I already have that does some other minor formatting, so no need for headers and whatnot.
This will print the HTML tags as you specify for all of the links in your document.
Of course, you’ll want to do something more useful with them than just print them in the Immediate window.
As an aside, I prefer to use DuckDuckGo in my examples due its much better privacy policy than Google’s…