Solved

Hyperlinks with merge fields lose the reference to the merge field after save in word 2007

Posted on 2009-05-13
12
996 Views
Last Modified: 2012-05-06
I am trying to create a hyperlink in Word 2007 that references a merge field to provide the location of an image. When I insert the hyperlink it looks as follows:
{HYPERLINK {MERGEFIELD "PHOTO"}}
However when I click save and reopen the file the merge field no longer appears and all I see is
{HYPERLINK}.
When I merge the letter none of my photos print as a result of this.

This works fine in word 2000 and word2003. If I save as a word2003 format it still works ok, but if I save as a DOCX then the merge field gets removed.

Any help with this would be appreciated. It seems like this is a known issue but the other solutiions I have seen do not seem to apply to what I am doing or work for me.
0
Comment
Question by:kmccann
  • 6
  • 5
12 Comments
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 24386108
Is that the only field in the document?  Or do you have other merge fields?
0
 

Expert Comment

by:lundy23
ID: 24399439
I'm having the exact same trouble.  In my documnent I also have other standard merge fields.  Those save just fine.  

This is what my field looks like before I save it --- {HYPERLINK {MERGEFIELD Bus_Dir_Link } \* MERGEFORMAT }.  It works great to pull variable hyperlinks from my .csv file.

After returning to the saved doc, then the Mergefield section contains the actual data from my first record and no longer performs the merge.

If I recall correctly, this was working fine in Word 2003 and I just upgraded to Word  2007.
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 24425896
What happens when you press Alt-F9?
0
 

Author Comment

by:kmccann
ID: 24426709
When I press ALT F9 it toggles between showing the hyperlink and mergefield syntax and the display text. After I save and come back in the toggle will display the display text or the HYPERLINK syntax with no mergefield syntax. Basically the mergefield inside the hyperlink is deleted every time you save the document. I read somewhere that due to the way that XML saves the hyperlink in DOCX it cannot be dynamic but has to be a simple hyperlink. So I need to find some alternate solution that does not use hyperlinks to do this.

This definitely worked in 2003 and will still work if I save the doc back from 2007 to the old 2003 format, but I have 800 users who will not remember to do this.

I saw some references to INCLUDEPICTURE that looked like they may work but I have not been able to get the syntax to be recognized. I have followed the help and it does not work the way it is described in help and I never can see the field code. If someone know how to get to the field codes for INCLUDEPICTURE that may be my solution.
0
 

Author Comment

by:kmccann
ID: 24426718
btw, other mergefields work fine as long as they are not inside the hyperlink.
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 24432112
Insert, QuickParts, Field, IncludePicture

Is that what you need?

Although this article is for 2003, it works the same way in 2007.
http://office.microsoft.com/en-us/word/HP051861641033.aspx

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:kmccann
ID: 24470303
Hi Jorzech
   I have been away on vacation for a few days and just getting back. Let me check this out and see if it will work for me. Thanks for the link.
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 24475477
Lucky you...vacation! Let us know Kmccann.... *smile*

Joanne
0
 

Author Comment

by:kmccann
ID: 24489218
I have tried this 10 different ways and still cannot get the field to display. I do the following:
- click on Insert..picture
-select the file I am interested in
- on the insert button click the drop down and select "link to file"
- I then see the actual picture in the document.
- if I click alt f9 I still see the picture

I cannot get back to the field codes that would show me something like "{ INCLUDEPICTURE "FileName" [Switches ] }" so that I could override the hard coded file name with the mergefield that I need to make this dynamic.
If I right click on the picture I donlt see anything useful that would get me back to the field code or to edit the file name that I initially selected.

I just can't seem to find a way to get back to the actual field code once the picture is inserted, regardless of which insert option I select.It seems like I have to be missing something obvious but I have tried this every way possible.

I would be eternally grateful to anyone who can give me step by step instructions as how to get in an edit the fieldcode for the INCLUDEPICTURE field.

0
 
LVL 37

Accepted Solution

by:
Joanne M. Orzech earned 500 total points
ID: 24492337
You should not be inserting the picture itself from what I am reading...

As I said above, go to Insert, QuickParts, Field, and select INCLUDEPICTURE.   Click OK.  Then, press Alt-F9 to view the field codes and insert your mergefield at that point.

0
 

Author Comment

by:kmccann
ID: 24497465
Sorry, I followed the hyperlink and was using that approach. I did not notice that you had said to insert quickparts in the text of your response. This does expose the fieldcode to me  and it holds on to the merge field after saving and reopening the file. Now i just need to rewrite the automation code I have that updates the path to the file and I should be good to go. Thanks so much for the help JOrzech.
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 24497579
That's wonderful news!!!  I am so glad I was able to help... Thank you.

Joanne Orzech
MS Word MVP
EE Zone Advisor
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now