Avatar of DatabaseDuane
 asked on

Mail Merging To Outlook Needs Logo inserted

I have a mail merge routine set up that uses Outlook (not express).
The code looks like this:

Public Sub RunOutlook()
    'create message
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(olMailItem)
    With OutMail
        'the following line could be populated from a a field in a table
        .To = RecipientList!Address
        .Subject = RecipientList!Header
        .Body = RecipientList!messagebody
        .Display   'change to .Send to send without review
    End With
    'kill objects
    Set OutMail = Nothing
    Set OutApp = Nothing

End Sub

 I need to insert a logo above the message. I've tried playing with the signature within Outllook, but I'd like to do this without having to set up individual Outlook apps.

Any ideas?
Microsoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon
Graham Mandeno

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

I've put this into the code and 2 issues have come up.
1. the image doesn't show on the e-mail, just one of those small boxes with an X in the middle. I had it show me the code behind the e-mail and it says --

"{INCLUDEPICTURE \d "%3cimg%20src='C:/LibraryLogo.gif%20width=516%20height=120%3e"\*MERGEFORMATINET}

Dear Joyce R., .....(the e-mail continues on fine)"

2. Does this insert a link or the actual photo. If it is a link, I need to put this on a server, yes?

Thanks for your help on this.
Graham Mandeno

Are you sending the mail in HTML format or RTF?  It should be HTML, but those look like RTF codes.


HTML. I copied the source code from the e-mail.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.17063" name=GENERATOR></HEAD>
<BODY><IMG src="<img src='C:\LibraryLogo.gif' width=516 height=120>">
<P>Dear Joyce R.,<BR><BR>Thank you for your ......library.org</P></BODY></HTML>

Open in new window

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

I found the problem. I had "img src" in there twice in the code.

Thanks for your help!!