Solved

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

Posted on 2009-05-13
12
1,016 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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
 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

762 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