• Outlook 2003 – Embedded Image not Received

    Home » Forums » AskWoody support » Productivity software by function » MS Outlook and email programs » Outlook 2003 – Embedded Image not Received

    Author
    Topic
    #461738

    I’ve written VBA code to send a mass mailing email that contains an embedded image (a jpg logo). I tested the code on my own computer using Outlook 2007. Everything works perfectly.

    The problem I’m having is that when I installed it on the user’s computer, which has Outlook 2003 installed, the message is sent out and received but the embedded image is not received. The message appears perfectly in the Sent Items folder, including the image . Upon receipt, however, instead of the image, the dreaded red x appears. I Googled this and tried changing a few Outlook 2003 settings but nothing works.

    I’m thinking that it appears fine in the Sent Items folder because the image is physically on that C: drive. What settings control this?

    Any ideas? Thanks, in advance.

    Viewing 2 reply threads
    Author
    Replies
    • #1172640

      What code do you use to embed the image?

      • #1172653

        What code do you use to embed the image?

        Thanks for the reply. Here is my code. Strpath is the path in which the jpg file is located. The commented out strpath = statement is the path on my computer.
        *************************************************************************
        Public Sub SendMessage()
        Dim strbcc As String
        Dim strmsg As String

        Dim dbsmember As Database
        Dim rstvols As Recordset

        Set dbsmember = CurrentDb()
        Set rstvols = _
        dbsmember.OpenRecordset(“qry-email alone for broadcast message”, dbOpenDynaset)
        On Error GoTo err1

        strbcc = “”
        Forms![BroadcastMessageSubmenu].strerrmsg = “”

        rstvols.MoveFirst
        intnumvols = 0

        Do While Not rstvols.EOF
        With rstvols
        If Not IsNull(![CV Email]) Then
        strbcc = strbcc & ![CV Email] & “;”
        intnumvols = intnumvols + 1
        End If
        End With
        rstvols.MoveNext
        Loop

        Set rstvols = Nothing

        If intnumvols = 0 Then
        GoTo err1
        End If

        ‘strpath = “D:My DocumentsALLVLogos”
        strpath = “C:Documents and SettingsAll UsersDocumentsLogos”

        strmsg = “

        Following is a message from Assistance League® of Las Vegas:


        ‘strmsg = strmsg & “ “”

        Dim strEmail, strSubject As String, strBody As String
        Dim objOutlook As Outlook.Application
        Dim objEmail As Outlook.MailItem

        Set objOutlook = CreateObject(“Outlook.application”, “localhost”)
        Set objEmail = objOutlook.CreateItem(olMailItem)

        ‘strEmail = ” a @ b.c”
        ‘strBody = “Make this bold and add a line.”
        ‘strSubject = “Subject”
        With objEmail
        .BCC = strbcc
        .Subject = “Enter Message Subject to Volunteers here”
        .HTMLBody = strmsg
        ‘.Send ‘Will cause warning message
        .Display
        End With

        Set objEmail = Nothing
        Exit Sub

        err1:
        Forms![BroadcastMessageSubmenu].strerrmsg = “No members found in this group. No email message will be generated.”
        Exit Sub
        End Sub

    • #1172649

      Upon receipt, however, instead of the image, the dreaded red x appears. I Googled this and tried changing a few Outlook 2003 settings but nothing works.

      If you view the source of a message where the image does not appear, does the tag have a src attribute similar to src=”cid:image…”? That usually indicates that the image was embedded rather than merely linked, and was bundled into the message as an attachment.

      • #1172654

        If you view the source of a message where the image does not appear, does the tag have a src attribute similar to src=”cid:image…”? That usually indicates that the image was embedded rather than merely linked, and was bundled into the message as an attachment.

        Thanks for the reply. Here is the src = statement obtained by viewing source on the received message:

        src=”file:///C:Documents%20and%20SettingsAll%20UsersDocumentsLogosLasVegas.3color.jpg”

        • #1172658

          As you can see, the img tags refer to files on your hard disk, so they are linked, not embedded. Hence the recipient won’t be able to view them.

          See To add an embedded image to an HTML message in Microsoft Outlook using code for the code you need to embed an image instead of linking it.

          • #1172671

            As you can see, the img tags refer to files on your hard disk, so they are linked, not embedded. Hence the recipient won’t be able to view them.

            See To add an embedded image to an HTML message in Microsoft Outlook using code for the code you need to embed an image instead of linking it.

            Thanks, Hans. I’ll give this a try.

            Several additional points/questions:

            1 – When I did the original testing using Outlook 2007 and the code I posted, I sent the message to two other individuals beside myself. Both of them received the image. Any idea why?

            2 – Will the code you provided attach the image or embed it in the message? The requirement is for it to be embedded in the message, not attached.

            Thanks.

            • #1172672

              1. I have no idea, sorry.

              2. The code I posted a link to will embed the image in the body of the e-mail message.

    • #1172724

      I wanted to give you both an update on my workaround to this issue.

      I missed an obvious solution yesterday – i.e. use src = “http://…….”. So, I uploaded the image to the organization’s website and used the following two lines of code:

      strpath = “http://allv.org/imageDisplay/0601544LasVegas.3color.jpg”

      strmsg = “Following is a message from Assistance League® of Las Vegas:

      Of course, it takes a fraction of a second longer for the image to appear in the Outlook window but the image is received by all recipients.

      Thanks, again, for your replies.

      • #1172726

        A link to a public website should work, but some recipients may be prompted to allow images to be displayed.

        • #1172732

          A link to a public website should work, but some recipients may be prompted to allow images to be displayed.

          Thanks, Hans, as always.

          I’ll keep that in mind if the issue comes up.

    Viewing 2 reply threads
    Reply To: Outlook 2003 – Embedded Image not Received

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

    Your information: