locked
Mail Merge Pictures RRS feed

  • Question

  • I am currently wanting to create a template with the mail merged picture - does anyone know how I can resized and adjust the sizes of the pictures?

    Wednesday, April 4, 2012 5:26 AM

Answers

  • Hi Lisa,

    You can constrain the picture size by creating a table cell of the appropriate size and placing the mergefield inside that. here's some extra info you might find useful:

    When embedding a mailmerge field in an INCLUDEPICTURE field for the purpose of merging graphics:
    1. the filepaths to the fields need to have the separators expressed as '\\' or '/' instead of the usual '\';
    2. the pictures usually won't show until you refresh the fields (eg Ctrl-A, then F9); and

    3. even after updating the images, they remain linked to the image files, which can be an issue if you later delete the image or you need to send the merged output to someone else.

    The following field construction addresses all three issues:
    {IF {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d}}
    or
    {IF {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\{MERGEFIELD Image}"} \d} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\{MERGEFIELD Image}"} \d}}

    After running a mailmerge coded this way, you'll have the correct, unlinked image for each record.

    The same kind of field construction can be very useful where the filepath for the images is held in the mailmerge data source. In that case you could use:

    {IF {INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d}}
    or
    {IF {INCLUDEPICTURE {IF TRUE "{MERGEFIELD FilePath}\{MERGEFIELD Image}"} \d} {INCLUDEPICTURE {IF TRUE "{MERGEFIELD FilePath}\{MERGEFIELD Image}"} \d}}

    Note: You need a path separator between the filepath mergefield and the image mergefield. If that separator is included in the source data, it can be omitted from the field above construction but leaving it there has no adverse effects either.

    Similarly, if the path data are included with in the image field, you can use:
    {IF {INCLUDEPICTURE {IF TRUE «Image»} \d} {INCLUDEPICTURE {IF TRUE «Image»} \d}}
    or
    {IF {INCLUDEPICTURE {IF TRUE {MERGEFIELD Image}} \d} {INCLUDEPICTURE {IF TRUE {MERGEFIELD Image}} \d}}

    For what it's worth, *provided* the path has the separators expressed as '\\' or '/', you can retain the links by omitting the all-encompassing IF test and the images will display correctly without the need to refresh the fields after completing the merge. For example:
    {INCLUDEPICTURE {IF TRUE "C:\\Users\\My Document Path\\Pictures\\«Image»"} \d}

    Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar.


    Cheers
    Paul Edstein
    [MS MVP - Word]


    Friday, April 6, 2012 5:07 AM

All replies

  • Hi Lisa,

    You can constrain the picture size by creating a table cell of the appropriate size and placing the mergefield inside that. here's some extra info you might find useful:

    When embedding a mailmerge field in an INCLUDEPICTURE field for the purpose of merging graphics:
    1. the filepaths to the fields need to have the separators expressed as '\\' or '/' instead of the usual '\';
    2. the pictures usually won't show until you refresh the fields (eg Ctrl-A, then F9); and

    3. even after updating the images, they remain linked to the image files, which can be an issue if you later delete the image or you need to send the merged output to someone else.

    The following field construction addresses all three issues:
    {IF {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d}}
    or
    {IF {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\{MERGEFIELD Image}"} \d} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\{MERGEFIELD Image}"} \d}}

    After running a mailmerge coded this way, you'll have the correct, unlinked image for each record.

    The same kind of field construction can be very useful where the filepath for the images is held in the mailmerge data source. In that case you could use:

    {IF {INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d}}
    or
    {IF {INCLUDEPICTURE {IF TRUE "{MERGEFIELD FilePath}\{MERGEFIELD Image}"} \d} {INCLUDEPICTURE {IF TRUE "{MERGEFIELD FilePath}\{MERGEFIELD Image}"} \d}}

    Note: You need a path separator between the filepath mergefield and the image mergefield. If that separator is included in the source data, it can be omitted from the field above construction but leaving it there has no adverse effects either.

    Similarly, if the path data are included with in the image field, you can use:
    {IF {INCLUDEPICTURE {IF TRUE «Image»} \d} {INCLUDEPICTURE {IF TRUE «Image»} \d}}
    or
    {IF {INCLUDEPICTURE {IF TRUE {MERGEFIELD Image}} \d} {INCLUDEPICTURE {IF TRUE {MERGEFIELD Image}} \d}}

    For what it's worth, *provided* the path has the separators expressed as '\\' or '/', you can retain the links by omitting the all-encompassing IF test and the images will display correctly without the need to refresh the fields after completing the merge. For example:
    {INCLUDEPICTURE {IF TRUE "C:\\Users\\My Document Path\\Pictures\\«Image»"} \d}

    Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar.


    Cheers
    Paul Edstein
    [MS MVP - Word]


    Friday, April 6, 2012 5:07 AM
  • check this link this might help you

    http://www.squidoo.com/IncludePicture

    Friday, April 6, 2012 10:54 AM
  • check this link this might help you

    http://www.squidoo.com/IncludePicture


    The info there is not the least bit relevant to the OP's query.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Friday, April 6, 2012 10:59 AM