0

I've been searching for days for an answer to this issue. I'm trying to append an Access field to a base URL to customize each email in my merge like so: http://www.example.com/myItems.asp?ItemID={field}.

I tried several approaches in Word 2007, then gave up and finally tried Publisher after coming across this post - MS Word: Mailmerge hyperlinks with query get URL string with a MERGEFIELD.

In Publisher, I got everything to merge properly including the custom links (according to preview), but when I hit "send email" it wasn't passing the emails to Outlook - said 0 message(s) sent. I tried again, using a blank email template and got it to pass the email, but the email showed field names rather than the merged data.

Coming across this article regarding the field names - http://msgroups.net/microsoft.public.publisher/emailmerge-not-working-in-publishe/213664 - I clicked outside the text box as suggested before sending email but still, the field names show and not the merged data.

I'm super frustrated and exhausted. This shouldn't be this difficult! Any ideas or suggestions would be appreciated.

Community
  • 1
  • 1

1 Answers1

0

This shouldn't be this difficult!

I agree. I can't help on the Publisher front, but this link should help for Windows Word.

To summarise, when you insert the HYPERLINK field, do it this way:

  • Use ctrl-F9 to insert a field code brace pair { }
  • Type HYPERLINK between the braces
  • Select the field and update it once (F9)

Do not update this field code again. If you do, Word will always insert the same link text (i.e. the hyperlink target). People working with fields often select F9 quite a lot just to make sure things are up to date, so you have to try not to do that.

If you Alt-F9, you should see that the display text is an error message (starting with "E" in the ENglish language version of Word).

Move the insertion point so it is immediately after the E. Type the display text that you want, or, if you want a variable display text built from text + MERGE fields etc, enter that text and those codes).

Carefully remove the "E" and the other part of the error text.

Use ALt-F9 again to display the HYPERLINK field code. Click after the K, type a space, then enter the following fields and text, assuming your variable text is coming from a MERGE field called fieldname:

"{ SET X 1 }http://www.example.com/myitems.asp?ItemID={ MERGEFIELD fieldname }"

(The SET field is there to stop Word doing something else wrong. If you have more than one HYPERLINK field, you will need to SET a different variable name (X1, X2 etc.) in each HYPERLINK). This is discussed in more detail here - interestingly enough, that question was also about merge to HTML email, but I think you also have to do the additional stuff I mention above to make it all work.

June7
  • 19,874
  • 8
  • 24
  • 34
  • Hi, thanks for you time to answer! I found an article very similar to your instructions. I have to follow the article to a tee so everything works properly and spot check hyperlinks before sending the emails. The main differences between instructions are the SET and MERGE FORMAT fields. My outcome appends %20 to the URLs, but the destinations work. Article (Method 1): http://support.microsoft.com/kb/912679. I use filters in my merge and can delete the hyperlink syntax, resave the document as something else, edit my filters and enter the new hyperlink syntax. So far, so good! – user3457264 Aug 07 '14 at 17:44
  • I shouldn't have said "follow the article to a tee" since the instructions are for an older version of Word, thus menu items are different. Also, if using a base URL, that must be typed after HYPERLINK in quotes with the MERGE FIELD tag and field name inserted. Two MERGE FORMAT tags appear - one must go and the syntax ended with the last quote before the last bracket. Note this comment will not allow the exact syntax to be viewed or I would post it. I'm sure that last quote mark is what's causing my URL destinations to tack on %20 at the end, but it does seem to work. – user3457264 Aug 07 '14 at 18:55
  • Not sure your problem is solved, but if not...may I suggest that you follow the approach in the link I provided - StackOverflow's formatting sometimes makes the link non-obvious, so: http://answers.microsoft.com/en-us/office/forum/office_2010-word/adding-a-merge-field-to-an-email-hyperlink-in-an/4a732a11-352d-45de-87f3-1f607ff4aece The reason I ask you to follow one procedure is that you can say what you had to do differently (e.g. because the procedure didn't go as expected). At the moment I am not sure whether you followed that procedure or the one in the kb912679 article. –  Aug 07 '14 at 21:43
  • Hi, thanks for your reply and I will try your article. During my search for answers and prior to yours, I successfully used Method 1 of the KB article with revisions. I added a double quote and base URL after the HYPERLINK tag, then the MERGE FIELD tag for the db item (in brackets). I ended with a closing double quote and deleted the last MERGE FORMAT tag before the last bracket. Prior to emailing 230 people, I tested this several times in Word, Outlook, Windows Mail and major webmail clients. I tested after responses came back and they still worked fine even with %20 tacked at the end. :) – user3457264 Aug 11 '14 at 03:05
  • It sounds like there is still a space between the { MERGEFIELD } field and the closing double-quotation mark. You should not need any of the \\*Mergeformat switches –  Aug 11 '14 at 07:29
  • I agree, I'll take a look - there a couple more emails I need to send out, so will try removing the MERGEFORMAT tag and space. Thanks so much...I searched for answers for days and found a lot of others searching as well. Hopefully, this post will help!! THANK YOU!! – user3457264 Aug 11 '14 at 16:27