#1
|
|||
|
|||
Convert html links into embedded hyperlinks
Hello,
I am using mail merge to import large text strings from an Excel document into Word. The final Word document needs to have embedded hyperlinks, however, which presents an interesting challenge. One cannot use concatenate to create an embedded hyperlink within an excel cell, so I thought I could include the hyperlinks using identifying tags, and then use a macro to process the mail-merged document to convert the tagged links into embedded links. I am using <a href...></a> tags simply because it's logical to me, but any unique identifier would do. Basically, after the merge I will get a paragraph much like this: "Savings increase with the size of the network; however, <a href="http://www.hsp-central.net/Power_Study.pdf"> one study </a> demonstrated energy savings between 30 and 60% over conventional computers..." And I want to turn the <a href> identified hyperlink and enclosed text (in this case "one study") into a clickable hyperlink. I would like to process the entire document to detect <a href="> tags and make the change in each case. I imagine that the macro would take the text from between the > and </a>, and apply a hyperlink field code to it, using the <a href=" "> address. I do not know how to do this on my own, or where to start. The most complex macro I have programmed prior to this was to change table background colours. Any guidance or pointers would be much appreciated. I'm not expecting a fully coded solution (although that would be nice)! I'm sure I will learn a lot from this. Thank you for your help! |
Tags |
a href, hyperlink, macro |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |