Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Mail Merge with pictures (XP or not XP)

    There was a recent thread on toggling whether a picture was visible in a header. One of the suggestions was to use a mail merge.

    One of my friends is putting together a college reunion book. He asked me how he'd get pictures into this. The book will have a bio and (up to) 2 pictures (a "then" and "now" if available) for each graduate.

    We tried playing with mail merge to do this but gave up after a while. We were working in XP. One of the things we tried was to create a data source in Word XP with the textual info. Then closed this. Went into the Access DB that Word created for the data source, added a field to the table/query for an OLE object, and linked a picture. Went back into Word and opened the revised data source. Word just gave an error message or hung (don't recall which right now). When I deleted the OLE field, Word was happy again. Maybe because it was that I was fooling around with what Word thought the DB should look like and it might have still had problems even if I added just a text field while in Access.

    So now the questions:
    1. How would one create a field in Word 2002 that allows for a picture as part of a mail merge to accomplish the above?
    2. If it's different, how would one do this in versions prior to 2002? The reason for asking is that 2002 creates an Access DB if you create the data source in Word while earlier versions created a Word table.
    3. If one had an existing DB that had a picture field (say in Access), can this be used?
    4. Are there other suggestions for creating the reunion book? I suggested to my friend that he might want to use Access all the way and create a report that captures the info.

    Thanks.

    Fred

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Mail Merge with pictures (XP or not XP)

    In my view, it is easiest and safest to maintain images as distinct files rather than pasting them into a Word table or a binary object field in a database.

    I don't do enough merges to know: can you merge file names into pre-positioned INCLUDEPICTURE fields?

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi Fred:
    I don't have Word 2002 & but I know that it handles mail merges from Access differently than prior versions. In prior versions, you could do the following:
    First, you can have pictures as separate files. Secondly, in your datasource, a Word table, you can have a field (table column) that is an INCLUDEPICTURE field. You then put a mergefield for that column in your main document. When you do the merge, the includepicture field is brought over and updated. Depending upon how you are going to going to distribute the yearbook, you might want to unlink the pictures in the merged document (Ctrl+Shift+F9). Otherwise, you need to send all the picture files along with the yearbook AND you'll have to update the fielpaths in each new computer.

    I vaguely recall that with Word 2002 & using Access, you need to use the select method for the mailmerge, which uses DDE like the older versions. I know Hans has Word 2002 & hopefully will be able to expand on that.
    Hope this helps,

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Using an OLE field in Access isn't going to work at all, since Word doesn't recognize this. In theory, storing the path to the image in the database, and using nested INCLUDEPICTURE and MERGEFIELD fields should work, but I've never had success with that. There have been threads about this in the past, but since we still can't search, I can't find them. Sorry.

  5. #5
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi Phil,

    Thanks for the non-XP response. I kind of figured it would be something like this since you're the master of the nested fields from everything I've seen. I was even thinking of the QUOTE field somehow being included since I think that's one of your favorites. Anyway, haven't had a chance to try it out but will soon. I'm assuming that one edits the Word table data source manually to get the path to the file.

    I'm wondering if the pictures stay in the same folder as the data source and/or the main document whether it matters which folder they're in. I'd assume relative addressing but will try and see if that works.

    As far as XP goes, I was demo'g the XP version of mail merge to my friend. Should have stuck with 2000. You probably have seen Hans's answer by now which suggests all may not be good. Will have to look at that too.

    Fred

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi Fred:
    A couple things you can try regarding the filepath. First, assuming you have a filepath in the Includetext field like:

    "C:My DocumentsPicturesThese Picturessomething.jpg"

    you can simply select the whole table column, & do a Find/Replace where you find & replace with .

    As far as using relative vs. absolute paths, I personally have trouble with relative paths & my Word 2000. Macropod has an add-in that will change absolute paths when they are moved. See <post#=261488>post 261488</post#>.
    P.S. Macropod is the real master of nested fields & uses the Quote field. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  7. #7
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi Phil,

    As I said, I'd get around to trying it soon. Today was the day.

    With Word 2000, it was pretty easy. I made a data source using Word. For the field with the picture, I added an IncludePicture field and included the picture's filename as a relative path. I was keeping everything (main doc, data source, and pics) in same folder. This worked fine. I even moved the folder, as a whole, into other folders - no problem with paths.

    Your other email mentioned doubling the back slashes for the absolute paths. Not sure if this was needed but didn't even try, per above.

    But when I did the merge, I didn't have to unlink the fields. The merged document's pictures were not linked to the originals - they were part of the file (in-line chars or floating depending on how I set it up). Not sure if there ever was a case of the pics being linked to the files (as opposed to the fields in the data source). This could make sense, since the result of a MM is NOT linked info - apparently not even for pictures.

    I wasn't sure what you meant by the "select method" if trying to set up the data source in Access.

    I also tried HansV's suggestion but, as he indicated, trying to nest IncludePicture and MergeField in XP did absolutely no good. This was trying to create a brand new MM main doc and data source in XP. However, if I brought the main doc and data source that was created in 2000 into XP, XP had no problems. So if we could only get the Search mechanism back to find whatever the thread was on MM with pictures in XP.

    Seems like XP's MM is a step backwards in some senses. There's a lot of improvement in XP's MM over 2000 but this area is not one of them!

    So if there's a way to do this in XP from scratch, it will remain a mystery.

    Fred

  8. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi Fred,

    Take a look at http://www.gmayor.com/mail_merge_graphics.htm. It may help.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  9. #9
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi macropod,

    Thanks for the lead. I did look at it and was able to construct an XP experiment which got very close. I had the next-to-last view of the tutorial with but blank pictures. I updated the fields and got the last view (the field codes view). When I went back to field results by Shift+F9, I got those pic placeholders with the little square in the upper left and a red x. Very close.

    Fred

  10. #10
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi Fred

    I've had some successes using the method detailed in Cindy Meister's article. The way I got round the broken graphic symbol you mention, was a bit of a happy coincidence for me, but might be adaptable to your situation:

    All of the graphics I used had filenames ending in "=.jpg" (don't ask!) and if a graphic didn't exist for the particular merge record, the INCLUDEPICTURE field would be trying to refer to "=.jpg" rather than "Item123=.jpg" or similar. This is just the way I generated the merge data source, which was for various "items" with names like "Item123", "Item456" etc. Rather than trying to get rid of these broken references, I simply created a file called "=.jpg" that contained a single white/ transparent pixel. This kept Word happy.

    Alan

  11. #11
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi macropod,

    thanks for the offer. As I said in one of my early posts, this is for a friend on a class reunion book. So I doubt anything is secret (unless you count the comparison of how someone looks today vs how they looked 30 years ago <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15> ). I'll see if he has anything. Last month, I think he was just beginning the project.

    Enjoy those few weeks off.

    Fred

  12. #12
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi Alan,

    Thanks for the tip. I read Cindy's tutorial. This works great for Word 97 and 2000 and I've gotten it working the way she explained. I think the approach, which used Phil Rabichow's suggestion, was to include the IncludePicture field in the data source. Then the main doc has the Mergefield that refers to the field with the picture. This is slightly different than Cindy's approach where she combines the IncludePicture and Mergefield right in the main doc. I'm not sure if there is any difference in the approaches; the results are the same and that counts for a lot.

    Either approach works fine with 97 or 2000, where you can create your source in Word as part of the mail merge process. XP doesn't allow you to do that anymore. I tried Cindy's approach in XP and it was a disaster - the nested fields just seemed to be problematic. HansV mentioned that early in the thread. As a way around that, you can still create a table in XP with IncludePicture fields and use that as your data source. You can also take an existing 97/2000 data source with pictures and run it thru XP and that works fine too.

    I think my friend is using XP. I may see him tomorrow and we'll see where he's gotten to.

    Fred

  13. #13
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Mail Merge with pictures (XP or not XP)

    <P ID="edit" class=small>(Edited by macropod on 22-Dec-03 09:28. Added PPS re use of FILIN field)</P>Hi Fred,

    If you were to post a documentcontaining the problem mailmerge field, I'm sure we'd be better placed to help. Strip out anything sensitive first. Another way of tackling the problem would be to see if you can get the right result using SET & REF fields (to manage the parameter currently being retrived by the mailmerge process) instead of the MERGEFIELD. Once you've got that working, reverting to the mailmerge equivalent should be fairly straightforward.

    Cheers
    PS: I'm not going to be able to give any more help on this one - I'm off on holidays for the next few weeks.
    PPS: A FILLIN field might be easier to work with than the SET & REF fields.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  14. #14
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Hi Fred

    I didn't twig to what Hans was saying, being totally unfamiliar with XP. Surely the changes you mention in XP represent a step backwards. I've used Cindy's method in 97/2000, using an XL worksheet as the data source. It appears that this would no longer be possible in XP. Even with an intermediate data source, to avoid the nested field codes, is it still possible to get the XL cell contents into said field codes?

    Alan

  15. #15
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail Merge with pictures (XP or not XP)

    Fred,

    Reading this thread, I decided to try again, and to my surprise, it works now! Note that backslashes in the path to the picture files must be doubled - if you include the path in the data source, you must double them there.

    (When I tried this previously and failed, I think I tried to use some pictures in the Shared Pictures folder. The path to Shared Pictures is problematic, however - it is displayed as Cocuments and SettingsAll UsersDocumentsMy PicturesSample Pictures in the address bar, but looks like Cocuments and SettingsAll UsersShared DocumentsShared PicturesSample Pictures in the folder tree. I suspect that my problem was caused by this confusion.)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •