Forum Discussion
ChrisBlanchard
Jun 30, 2022Copper Contributor
How to get Mail Merge to accept .jpg Logo substitution
At my company we use a code to select a company logo in some covering letters and invoices. Mail Merge used to pick up a two character code from a particular field in the associated Excel spreadsheet and extract an appropriate .jpg Logo to substitute onto the file. Due to new modifications, I believe associated with security, this .jpg extraction no longer works. We cannot get around this by using an insert picture Macro after the Excel data extraction has taken place because, by the time the data extraction has take place, the mail is merged and posted. This Catch22 situation would suggest that we either use separate Mail Merges for each company, with the Logo in place prior to Mail Merge, or that we somehow access the mechanics behind the scene and insert some code to carry out the operation that was previously done. It looks as if there is a hidden, system generated autoexec VBA macro that runs when you open up the Mail Merge document. On the internet, help suggestions are either circular nonsense or that you access this Macro and insert appropriate VBA code, and examples were given of this. I read that you could open up the word document using some non-standard App, such as 7-zip, to access the underlying macro that handles the Mail Merge and modify appropriately. However, 7-zip looks like it is used to handle archive access.
My question is, is there a background VBA Macro that has been system generated to handle the automated Mail Merge & is there an App that open the Word document to access this?
- hansleroyIron ContributorHi,
I found a nice way to do so: toggle field codes and put IncludePicture to insert the picture
See https://www.datanumen.com/blogs/2-ways-batch-insert-multiple-pictures-word-document-via-mail-merge/
Kind regards
Hans ChrisBlanchard If you upload a typical mail merge main document and data source and a couple of the image files, I will see if my Merge Tools utilities can create output that you required. Alternatively, you can send them to me at the email address in the attached Look at Me First.jpg