Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

word merge links problem

Status
Not open for further replies.

joemajestee

Programmer
May 5, 2010
35
US
I'm trying to merge links into a directory in Word 2003.

The data is from Excel. The problem I'm having is that I can't seem to get the hyperlinks in the final document to be live. There is sometimes no URL, so there's an IF statement. Finally, the text in the document is always simply "Link".

The excel data is something like this:
Code:
ColB
Item1URL
[URL unfurl="true"]http://www.site.com[/URL]

What I have currently in the starting document is:
Code:
{if { MERGEFIELD "Item1URL" }<>"" { HYPERLINK "{ MERGFIELD "Item1URL"}" }}

I did use ctrl-F9 to create the {}. I get a blue underlined "Link", but no actual link. The IF part is working, ie. "Link" does not appear at all for records with no link.
 
Hi joe,

Perhaps the simplest solution is to use the "Item1URL" MERGEFIELD to insert the link as plain text and then, after the merge has been executed and you've got the output document, go to Format|Autoformat. You may need to be choosy about which autoformat options you allow to execute, but you could record the process in a macro to automate the update.


Cheers
[MS MVP - Word]
 
Perhaps I'm missing something, which is likely, so I'll ask the question.

My final doc would then have a 30 different urls in plain text. Is your suggestion that I put 30 different autocorrect entries in and then let it run? Or is there something in AutoCorrect that I don't know about?
 
Hi joe,

This has nothing to do with Autocorrect and no autocorrect entries are needed.

What I suggested was to:
use the "Item1URL" MERGEFIELD to insert the link as plain text and then, after the merge has been executed and you've got the output document, go to Format|Autoformat.


Cheers
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top