View Single Post
 
Old 10-04-2012, 06:36 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

In your second post you said:
Quote:
My Excel data sheet has headings:

"Picture" for the combined path and picture filename. The first entry below the header is "C:\\Documents and Settings\\John\\My Documents\\FPC\\Directory\\DirectoryPhotos\\Abels_ Jon_1011_DSCF2804r.jpg", with quotes.

"Filename". The first entry is Abels_Jon_1011_DSCF2804r.jpg, no quotes.

"Caption". The first entry is Jon and Lily Abels, no quotes
and that:
Quote:
The first cell in the Word document contains the following:

{ INCLUDEPICTURE { MERGEFIELD “Picture” } \* MERGEFORMAT }
{ MERGEFIELD “Filename” }
{ MERFIELD “Caption” }
{ NEXT }

I press <Alt + F9> and get

Error! Filename not specified.

Abels_Jon_1011_DSCF2804r.jpg
Jon and Lily Abels
The error on the first line is probably because you need to enclose the mergefield in double quote, thus:
{INCLUDEPICTURE "{MERGEFIELD Picture}"}
(Note that you don't need them inside the mergefield and you don't need the mergeformat switch).
Even when you fix that, though, the INCLUDEPICTURE field may not resolve correctly until the merge is executed. If it doesn't you'll still see the 'Error! Filename not specified.' display, but the actual merge should work OK.

The reason the more complicated versions of the field code I posted doesn't need the double quotes is that, when the merge is executed, the data are resolved and unlinked all in one go, so there's no INCLUDEPICTURE fields in the output document. In the simpler (last) version, you'll see that the double quotes are still there, as required. The IF TRUE test simply forces Word to resolve the data as the merge is executed; without it, users often have to refresh the links after the merge (eg via Print Preview or Ctrl-A, F9), to see all the images.

As for the repeated data, that suggests you're using a letter merge. What you should be using is a label merge, with {NEXT} fields either:
• at the end of every label except the last; or
• at the start of every label except the first.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote