• Inserting an image via Mail Merge

    Author
    Topic
    #483718

    Using Office 2007. I have a database set up in an Excel spreadsheet. Setting up the text data to insert into a Word Formletter is no big deal. What I’m not sure how to accomplish is how to insert images into the form letter.

    Can I insert a full size image into a cell in Excel then mail merge that cell just like it was text?

    Is there some other method for automatically inserting images into a Formletter?

    Thanks in advance for any help.

    Larry P

    Viewing 14 reply threads
    Author
    Replies
    • #1336226

      Hi Larry,

      AFAIK you can’t insert the images directly from cells in the workbook – the images need to be in external files, whose names (and, perhaps, paths) appear in the workbook.

      When embedding a mailmerge field in an INCLUDEPICTURE field for the purpose of merging graphics:
      1. the filepaths to the fields ordinarily 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 of the above issues:
      {IF {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures«Image»”} d} {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures«Image»”} d}}
      or
      {IF {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures{MERGEFIELD Image}”} d} {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures{MERGEFIELD Image}”} d}}
      After running a mailmerge coded this way, you’ll have the correct, unlinked image for each record.

      This form of field construction can be very useful where the filepath for the images is held in the mailmerge data source, in which 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 1: 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.

      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 2: The field brace pairs (ie ‘{ }’) for the above examples are created in the body of the document 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
      [Fmr MS MVP - Word]

      • #1382928

        I have followed the instructions above, but still am unable to move the document on to a different PC with out the images disappearing.

        • #1382985

          I have followed the instructions above, but still am unable to move the document on to a different PC with out the images disappearing.

          The only version of the above field coding that is possible with is the last one – because the links remain in the file. Before moving the file to another PC, you should break the links (eg Ctrl-A, Ctrl-Shift-F9), which is what the other field constructions do for you.

          Cheers,
          Paul Edstein
          [Fmr MS MVP - Word]

          • #1384329

            I use this all day long to send postcards, envelopes and letters with different before and after pictures of mobile sites of mobile phone images and also to sell SEO services.
            33549-WSO6seopostcards 33550-WSO3-env-postcard1

            I have mastered it now but the merge code is notoriously unstable. Even after you get it working if you save your template under a different name the code comes undone. If you merge to a different spreadsheet it comes undone. If you try to use the position tool on a graphic it comes undone. If you open a template on a different computer it comes undone. Having said that and after playing with it for several months I discovered all the quirks and rules to using it and got it working smoothly.

            The basic steps go like this:
            1. Open a document and save it right away as a .doc file not a .docx file
            2. Link a spreadsheet to the document with standard mailmerge functions
            3. Insert a picture of the size you expect to output into the document using the “link to file” function, don’t use “link” which is the first option.
            4. Hit alt f9 and you will see something like this {INCLUDEPICTURE”../../../../../../prospects/Atlanta/dentist/cell/cosmeticaft.JPG”* MERGFORMAT d} where cosmeticaft.JPG is a picture I choose that is the approximate size of all the ensuing pictures that will fill this spot in the document.
            5. Edit it so it looks like this :{INCLUDEPICTURE”c:\prospects\Atlanta\dentist\cell\{ MERGEFIELD cellaft}.JPG”* MERGFORMAT d} where { MERGEFIELD cellaft} is the mergefield column in the spreadsheet. The graphics have to have the same name as the names in this column. You have to insert this mergefield from the mailmerge menu where it says insert merge field.
            6. Hit alt f9 again and the document will revert to its normal appearance.
            7. Output the document using edit documents not email or print documents.
            8. Use ctrl A to select all the documents in the document output file and then hit f9. If you have used a text box to hold the document image you have to click on the picture and then hit f9. The images will all change. If they didn’t then you named them wrong either in the graphics file or the spreadsheet or you didn’t set up the merge code correctly. If you accidentally insert a space somewhere in the code it won’t work.

            You don’t need the IF TRUE function if you do the above steps.

            Rule: Your graphics have to be in a lettered drive like c: or d: or f: etc. I have never been able to get them to work from a “my documents” file.

            Once you do get it working it works fantastic and getting around the quirks becomes second nature. You can buy an add on .

            Hope that helps
            Rainer

    • #1384331

      Hi Rainer,

      Re Step 1: Since mailmerge works quite happily with .doc files (and has done so for over 20 years), I question the validity of this step.

      Re Step 4: Selecting a field and pressing Shift-F9 to toggle its display is preferable to using Alt-F9. The former toggles only the selected field, whilst the latter toggles all fields and can confuse users when the field they were interested disappears off screen in a document with lots of fields. The insertion of an INCLUDEPICTURE field does not generate path separators denoted by ‘/’ – they’re always denoted by ‘\’. The fields will work equally well with ‘\’ and ‘/’. Furthermore, you don’t need the ‘* MERGFORMAT’ switch.

      Re Step 6: Pressing Alt-F9 after editing a field per your step 5 will leave it displaying the original graphic – hardly what one would want. You’d need to select the field and press F9 again to get it to update to reflect the edit. If Shift-F9 is used to toggle the display ‘on’, all that’s needed to toggle it ‘off’ and update it is F9.

      Re Steps 7 & 8: Your assertion that you don’t need the IF TRUE function merely demonstrates that you don’t understand what it does, which is to eliminate your step 8 (which you otherwise need to remember to do after every mailmerge) and to prevent errors when sending direct to printer at step 7.

      I can’t imagine why anyone would want to buy an addin for this when it can be done quite easily for free.

      Finally, none of what you’ve posted addresses point 3 of post #2 above.

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    • #1385749

      Thank you Paul,
      I wrote this post for those who are not technically inclined as a simple procedure that works.

      I would guess only 20% of us out there would be willing to write a conditional IF TRUE statement when editing the merge code so I did this for the other 80% because it works and is relatively easy to demonstrate by using a video to show the steps. As for trying to describe it here in writing, not so much. If you have a YouTube or other video that shows how to do this I would love to see it.

      I am not sure why you made the comment about Step 1. When you create a new document in Word 2007 for example the default is a .docx document. I am simply saying save it as a .doc and work in the compatible mode when you are doing this. If you are doing this in Word 2003 then yes you don’t need that step.

      Good point about shift f9 to view. I should have mentioned that.
      As for your points about INCLUDEPICTURE and MERGEFORMAT switch, true as to what you said if you are editing this as one who is experienced and doesn’t mind playing around with it.
      As for those who are not as experienced, the method works. Word writes those default codes for you including INCLUDEPICTURE and the MERGEFORMAT switch when you use “link to file” to insert the picture. I don’t touch it to keep it simple with one less instruction for someone new to this. Another bonus once you get used to doing it this way, is you can store the replacement text that is needed to edit the mergecode in notepad and use MS Word’s search/ replace function to fix it as needed through the whole document by copying and pasting from notepad. Not sure if that would work with how you are showing to do it as I have never tried it. Can you use search/replace doing it as you describe?

      As for not addressing point 3 of the post as you mentioned, true again. This is an alternate method and wasn’t relevant to that.

      As for paying for it, I agree, if your technically inclined and you can do this, don’t pay for it.

      Cheers from Canada
      Rainer

      • #1385819

        I am not sure why you made the comment about Step 1. When you create a new document in Word 2007 for example the default is a .docx document. I am simply saying save it as a .doc and work in the compatible mode when you are doing this. If you are doing this in Word 2003 then yes you don’t need that step.

        And what, exactly, is the point of saving it in the doc format if you’re using Word 2007 or later? Apart from anything else, doing so denies access to any content controls one might want to embed in the output. It is a pointless and possibly harmful step.
        You Step 4, about the path separators in INCLUDEPICTURE fields inserted by Word is simply wrong and users do not need to change them to the format you suggested – that’s how they appear anyway. Your ‘if you are editing this’ is irrelevant – even if you’re not editing it your construction is wrong. As for:

        Word writes those default codes for you including INCLUDEPICTURE and the MERGEFORMAT switch when you use “link to file” to insert the picture

        It never uses the path separators you posted and, with Word 2007 & later, it also doesn’t even generate an INCLUDEPICTURE field at all in the docx format. Furthermore, your advice does not address what to do when the path is included in the mergefield or is a separate mergefield.

        In summary, your ‘An almost simple explanation’ is incomplete, inaccurate and more convoluted than doing it as outlined in my post for whichever of the various possible scenarios matches the user’s needs. No particular ‘technical’ skills are required. For example, take the first scenario (one of the most complex) from my first post:
        • Position the insertion point where you want the image to appear and press Ctrl-F9 three times to produce three nested fields, thus { { { } } }.
        • fill in the fields so you get {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures”} d}, keeping the spaces where indicated.
        • insert the mergefield for the image names, thus {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures«Image»”} d}.
        • Select the fields & copy them to the clipboard.
        • Press Ctrl-F9 to wrap the existing fields in another field, thus { {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures«Image»”} d} }.
        • Type ‘IF’ inside the left-most field brace, keping the space to the right of the ‘IF’ and paste the clipboard content inside the right field brace, keeping the space to the left of where you paste (the pasted field quite possibly won’t be visible You should now see:
        {IF {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures«Image»”} d} }
        or:
        {IF {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures«Image»”} d} {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures«Image»”} d}}.
        • Select the whole field and press F9 (this step is optional).
        • Run your mailmerge.
        A comprehensive, relatively simple and reliable solution that does not require manual intervention after every mailmerge.

        Cheers,
        Paul Edstein
        [Fmr MS MVP - Word]

    • #1386320

      Hey Paul,
      I think I see what is happening here. I have not tried doing it your way before and I can see from what you are writing you have never tried it my way before. Just to make it clear using Word 2007 “my way” is putting it in .doc compatible mode and letting Word do its thing to put in its own coding and then editing that. Your way is to leave it in .docx mode as the default and then manually insert coding.
      So I tried it your way only because prior to this I never had any real clear instructions as to how to do it. Also prior to this I think I was putting in an extra space somewhere and screwing it up. But I did succeed per your instructions this time (I think).

      So I created a video using both methods and comparing the two. If you watch it all the way through to the second half it shows how I am doing it.
      There are pros and cons to both ways.

      The Pros for “your way” is that you don’t have to use ctrl A and f9 on the batch output file and you can see the images change as you flip through the records from the template file. The Cons are you have to be dead on with the way you enter your coding, space it the wrong way and it doesn’t work. Also you can’t resize the images by grabbing the image handles. So you are stuck with having to use an image resizer program to resize a large amount of graphics in a batch file which would create pixel degradation or you would have to use some other program to resize which is too much work.

      The Pros for “my way” is you only have to edit one small portion of the code that MS Word creates for you. You don’t have to type it out from scratch. It takes only 10 seconds or so to do this and it is a whole easier not to make a mistake. As for it being harmful, my computer would have been dead a year ago if that were the case. I have been using this successfully for over a year and training other to do it using a video explanation. The other plus point is that you can actually resize the image by grabbing the image handles and it preserves image quality for printing. Trying to explain this in a post in text form has simply never worked for me. The Cons for this method is the extra step of having to select the graphics and use f9 to get them to appear. If the image is in a text box (for when you are inserting an image into another image) then you can’t use Ctrl A, you have to tediously click on each image and hit f9.

      So if you know of a way of reszing the images without losing quality doing it your way I would sincerely love to hear about it.
      Here is the video comparing the two ways: http://youtu.be/22YhcJyjVMk
      Cheers again
      Rainer

      • #1386341

        I can see from what you are writing you have never tried it my way before.

        Wrong. How else do you suppose I know you’re wrong about the path separators Word uses? If you spent more that a few nanoseconds investigating what I have written about field usage in Word (including tutorials on the subject), you might have refrained from such a rash claim.

        Also you can’t resize the images by grabbing the image handles. So you are stuck with having to use an image resizer program to resize a large amount of graphics in a batch file which would create pixel degradation or you would have to use some other program to resize which is too much work.

        The proper way to constrain image sizes via a mailmerge, bearing in mind that the images one deals with may come in a variety of aspect ratios, is to create a single-cell table with a fixed column width and row height, then insert the fields into that. The particular benefit of this approach is that regardless of the aspect ratio, every image will be allocated the same vertical & horizonal space in the document and, even if a given image doesn’t use all the horizontal or vertical space available, the layout of the remainder of the document will be unaffected.

        I note you still haven’t addressed the inability to insert content controls into a mailmerge main document using the .doc format. Given that you also can’t use text or dropodown formfields in either format, that can represent a huge advantage in sticking with the .docx format in Word 2007 & later.

        Cheers,
        Paul Edstein
        [Fmr MS MVP - Word]

        • #1394701

          First of All, I wanted to thank both of you for your posts. They allowed me to decipher somethings.
          Paul, ultimately I went with your setup and everything seems functional – but I do have a couple questions.

          Notes you should know:
          Office 2010
          .Docx format

          1. I set up my image code as follows: {INCLUDEPICTURE C:UsersAradDropboxDaras ImagesEarringsRound{ MERGEFIELD Image}”} d}

          When I went to Inset My Image from the menu instead of what you show of: «Image» I got: { MERGEFIELD Image}

          Is there a difference? Also as soon as I did it it turned into an image.

          Later I was also not able to nest the additional if formula you outlined in the 6th bullet point. Word automatically turned it again into an image and I was not able to go back to the formula like I was for the first nested IF. So despite it still working for me with the above formula are there any drawbacks?

          2. I am able to go to “edit individual documents” and all the images are different. However if I save the file and reopen at a later date, Word says image not found. Do the images not save in the word file? Any possible way to do so?

          Thank you so much for your help.

          • #1394771

            Re 1: That only suggests you had Word’s filed code display toggled ‘on’ whilst doing the process. It’s of no particular consequence.

            The inability to access the field code for INCLUDEPICTURE fields is one of the quirks of using docx files. I don’t know why MS did that to them, as other ‘link-type’ fields don’t behave that way.

            Re 2: If you used the process I outlined, your mailmerge output files should have the images, but no links to them. So I wouldn’t expect the ‘image not found’ message from those. You are liable to get that message from the mailmerge main document, though, as it will be unable to resolve the field code until the merge is executed.

            Cheers,
            Paul Edstein
            [Fmr MS MVP - Word]

    • #1398382

      I hope I can use this thread to help educate me and also solve my problem – it seems very similar. I want to create Name Tags using the Avery 5147 sticky tag label. And of course I want to have Word 2003 print both a name (coming from Excel 2003) and a .jpg of each attendee.

      The .jpgs are individual files with file names “similar” to those that are in the Excel DB.

      I had read thru the steps in above posts but am not too sure those will work with my situation. I’m sure hoping you knowledgeable folks can help me get this done! Thanks.

      • #1398402

        The .jpgs are individual files with file names “similar” to those that are in the Excel DB.

        Unfortunately, that isn’t quite good enough. The fields that macropod showed in post #2 require that the data in the Excel DB are exactly the file names of the pictures, or else the merge won’t find the files. Your choice is whether to rename the files or to make the DB match the existing file names.

        This is just another example of how computers are fast but stupid. :confused: You can’t tell a computer program, “You know what I meant, so fix it!”

        • #1398490

          Unfortunately, that isn’t quite good enough. The fields that macropod showed in post #2 require that the data in the Excel DB are exactly the file names of the pictures, or else the merge won’t find the files. Your choice is whether to rename the files or to make the DB match the existing file names.

          OK. Thanks for the reply and help! I’m willing to rename 400 .jpg files since our class reunion committee will likely use again and again. But I have questions for sure.

          (1) If the Excel DB has FIRST and LAST names in separate cells, how do I name the .jpg files?

          (2) The steps above seem like I can follow them, once I know where to start. How do I make a “custom” mail merge anyway?

          • #1453505

            Hi Paul,

            First of, I wanted to thank you for your detailed tutorial of April 7 2013, I was so relieved to see that inserting an image from a url worked I almost cried. I am running a merge on over 2000 records and couldn’t see myself exporting and then inserting the images manually for half of the records, so a big thank you.

            Now I am facing with another challenge, I am using your merge “construction” and my line reads:
            {IF {INCLUDEPICTURE {IF TRUE “{MERGEFIELD Link }”} d} {IF {INCLUDEPICTURE {IF TRUE “{MERGEFIELD Link}”} d}}

            But as I mentioned above, only a part of my excel source’ records have a url leading to an image, therefore I get the message “Error! Filename not specified.” for those without link/image. That is fine because I can simply change the font into white and no one will see the error message, however, when I run the merge, I get a pop up for each record concerned saying “a field calculation error occurred in record x”. I read on the Windows help menu that I should be leading to a “then” second option for the If statement, as in “if you don’t find any image, then do nothing”.

            Any clue on how I modify my line to avoid generating any error message?

            Thanks in advance for any help you may bring!

            Sophie

    • #1398518

      You can add a column to your data in excel to build the full filename. In the new column you use a formula to provide the full file path – something along the lines of
      =”C:/Foldername/” & A2 & B2 & “.jpg”

      Use the wizard to get started
      Mailings > Start Mail Merge > Step by Step Mail Merge Wizard

      • #1398591

        There are a couple of ways to approach the design, and you need to settle on a consistent naming convention before you do anything else — certainly before you start renaming the files.

        Look through the names and find the most complicated case where two or more files with similar names need to be distinguished. For example (and it can get a lot more complicated than this!), suppose you have James Jones, James Q. Jones Esq., James Jones Jr., and James R. Jones in the same database, and they’re all different people with different images. How should you construct the file names so the correct image can be matched with each name? Should the file name be ___.jpg? How do you handle the case where there is no middle initial and/or no ‘extra’ — do you put in a placeholder, or just allow two consecutive underscores? How much effort do you need to put in to make sure the design won’t need to be changed in the future?

        Once the file names are known, you can figure out how to convert the fields in the database into exactly correct file names. You can set up a new column with a formula as Andrew suggests (probably the easiest way, because you can change the formula fairly easily). As an alternative, you can build the file name in the INCLUDEPICTURE field in the main document, by using more than one merge field plus other characters in place of what macropod showed as «Image». For example:

        {IF {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures«LastName»_«FirstName»_«MI».jpg”} d} {INCLUDEPICTURE {IF TRUE “C:UsersMy Document PathPictures«LastName»_«FirstName»_«MI».jpg”} d}}

    • #1400033

      Great suggestions! Thanks for being willing to help a rookie! I’ve finally grabbed some time today to get started. Just to be clear here, the formula name creation process you are advising is to just create a list of new files names. But, I still have to manually change each one of the .jpg file names to same. Correct?

    • #1400182

      Your file names MUST match exactly the file paths you tell the mail merge to find. If you didn’t name the images consistently then trying to use a (consistent) formula in Excel to build the file paths will fail. You need to decide whether you want to change the file names of the images or just manually type in the actual filenames in Excel.

      Ultimately, it all becomes easier if you are very consistent in everything but the computer is not going to care if your image file names are not consistent as long as you tell it what the name of the image IS.

    • #1400208

      Got it. This is the process I’m trying now. Seems like a great video.

      http://youtu.be/R80l8rEa1lQ

      • #1400313

        Got it. This is the process I’m trying now. Seems like a great video.

        http://youtu.be/R80l8rEa1lQ

        This process worked (after the author told me to OMIT the space indicated as required in the video)!

        BUT – Now I have a new issue, the images are all the same dimension in pixel length and width, BUT after the merge, they range in size from tiny to medium to large!? Why would that be and how can I control the size of the image area inside the label?

    • #1400395

      The problem with the images is probably that they are all saved in different resolutions (eg. the pixels in one image might have been told to be larger or smaller than the pixels of the next image).

      You can either batch process all the images to ensure they also have the same resolution and pixel count OR you can try to put the images into a single cell table which is size restricted to suit the smallest image.

      • #1400426

        The problem with the images is probably that they are all saved in different resolutions (eg. the pixels in one image might have been told to be larger or smaller than the pixels of the next image).

        You can either batch process all the images to ensure they also have the same resolution and pixel count OR you can try to put the images into a single cell table which is size restricted to suit the smallest image.

        I wondered about that so I loaded my 8 test images up in Irfanview. They do show a very slight variation in size. 119×67, 119×70, 121×69, 120×68, etc. However, the images that show up in my label merge are as small is 1/4 inch and as large as 1 1/2 inch. Does that seem likely with such a small variation in the resolution detail?

    • #1400429

      As I said, the image resolution is also important – not just the pixel count. The resolution describes the density of the pixels and is typically stated in pixels per inch (or dots per inch = dpi)

      The size of the image depends on the number of pixels divided by the resolution. For instance an image that is 120 pixels tall at a resolution of 120dpi will be exactly one inch tall. Another image that is also 120 pixels tall at a resolution of 240dpi will be half an inch tall.

      • #1401449

        As I said, the image resolution is also important – not just the pixel count. The resolution describes the density of the pixels and is typically stated in pixels per inch (or dots per inch = dpi)

        The size of the image depends on the number of pixels divided by the resolution. For instance an image that is 120 pixels tall at a resolution of 120dpi will be exactly one inch tall. Another image that is also 120 pixels tall at a resolution of 240dpi will be half an inch tall.

        Andrew – and others helping – I finally got back to work on this project (I’m almost out of time!!!!!) and when checking all 8 test images mentioned in prior post, they were all scanned at 96 DPI. Only property that varies slightly (see dimensions in prior post) is the pixel dimension.

        Ugh, now what???

        BTW – I did resample all the images to 110×139 and still varied output size. JPG attached.

        34401-test

    • #1401622

      Can you post some of the images themselves? I am fairly confident you are resizing not resampling the images and are either ending up with variations in pixel count or dpi. What program are you using to resize/resample the images?

      • #1401863

        Can you post some of the images themselves? I am fairly confident you are re-sizing not re-sampling the images and are either ending up with variations in pixel count or dpi. What program are you using to re-size/re-sample the images?

        You bet. 8 Images here. I use Irfanview. Also an image of that with the re-sample selected as default.

        34417-irfan34418-AndersonBrice34419-BoccarossaBarbara34420-LovettDavid34421-MillerAlan34422-NelsonDavid34423-NolanBarbara34424-StoneAnne34425-VanZanbergenDaniel

        EDIT!!!!

        Andrew after much head scratching I did go back and used IrFanview to re-sample all 618 files that I need to use, and doing the batch process all came out 110×139 at 96 dpi and then the label merge worked fine. So somewhere along the line, the re-sampling process was faulty as you surmised!

        I’m plowing ahead now to try to get the job complete and hoping I don’t have to bother any more! Thanks for helping!

    • #1409480

      I’m not clear on something: do the methods discussed in this thread embed the pictures in the document, or link them?

      I’m doing a “catalog” (or “directory”) merge, not individual letters, and I’ll have over 100 pictures, so I need to use links to prevent the document size from ballooning.

      • #1409498

        Use the nested fields in macropod’s first post in this thread. The result will be linked images, not embedded. (Yes, I checked.)

    • #1414580

      Hi Shawn,

      I’ve been OS for 3½ months, hence the delay in replying. Have you resolved the issue, or do you still need help?

      Whether the merged images are linked or embedded depends on which of the field constructions you use …

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #1415296

        No don’t need help anymore. I am now using it for something very useful. I do tent cards for restaurants using just one template. I also use this for postcards to sell SEO services and the great part is you can email first and if that doesn’t work then print and mail. I found using a table cell as you suggested as a container for the images worked great. Doing it this way avoids the problem of pixel depredation which occurs when you use software to reduce the size of the picture.
        I found it interesting that you could not copy and paste the whole merge code if you were saving as a .docx file but if you were in .doc mode it would copy and paste. Odd.
        I only tried this on a PC but not a MAC. I am assuming it doesn’t work on a MAC? or does it?
        The other little quirks were the spacing on the code. If you accidentally put a space between quotation mark ” and C: it wouldn’t work.
        Another thing I found was you could put {MERGEFIELD logo}.jpg” or }.png” after the spreadsheet mergefield to save yourself time putting in .jpg extensions in a spreadsheet field.
        Here are some tent cards I did for fun. You may recognize the names. I did other ones for real and got business out of them. This was to propose sell the client a mobile site combined with a Loyalty Program and SMS. The tent cards were printed on Kodak photo paper so it looked like a professional print shop did them. I am very happy with the result. I wonder if Microsoft will ever be smart enough to figure out how to do this in the next version of Word.
        35070-loyalty_tent_cards

        • #1415297

          I found it interesting that you could not copy and paste the whole merge code if you were saving as a .docx file but if you were in .doc mode it would copy and paste. Odd.[/quote]
          Yes, that’s one of the quirks of the docx format.

          I only tried this on a PC but not a MAC. I am assuming it doesn’t work on a MAC? or does it?

          The same approach should work on a Mac, though you might need to use the Mac path separators.

          I wonder if Microsoft will ever be smart enough to figure out how to do this in the next version of Word.

          I’m not sure what it is you think needs to be worked out. The existing tools do the job – it’s just a matter of learning how to use them to best advantage.

          Cheers,
          Paul Edstein
          [Fmr MS MVP - Word]

    • #1453520

      If you’ve inserted the field correctly, including all the required spaces and you’ve used field braces for all the { } characters, I see no reason why you’d get the field calculation errors. IF fields don’t require an ‘else’ statement. Each of the IF fields in the sample you’ve posted has its own ‘then’ statement. For example, with ‘{IF TRUE “{MERGEFIELD Link }”}’, the “{MERGEFIELD Link }” is the ‘then’ statement.

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #1453745

        Ok thanks Paul, I have tried to verify the spacing and didn’t see any error, and I take it that my construction is not “incorrect” since images are properly displayed when one is indicated. I tricked the system by creating a fake blank image so that there is always a link to an image in Excel, and I no longer have the error.

        It’s not really fixing the initial problem since I have to make sure I insert a link to my fake image for records without one, but at least I won’t have to hit “ok” 650 times when prompted “a field calculation error occurred in record xx”

        Thanks anyway for your help, already very happy to be able to display my images.

        Side Note: I’m using Word 2010, PC, and was displaying an error message when completing the merge for the links leading to a pdf , it was displaying a white empty table with a small cross logo and a note “The Linked image cannot be displayed. The file may have been moved, renamed or deleted. Verify that the link points to the correct file and location.” However when I open the completed merge file under Mac, I see the proper picture. I thought it would be worth mentioning.

    Viewing 14 reply threads
    Reply To: Reply #1401863 in Inserting an image via Mail Merge

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel