Embed several picture in email

L0ndonbound

New Member
Joined
Feb 16, 2017
Messages
15
Hi,

I am trying to embed several pictures (they need to be pictures - not based upon the links to the pictures as they are to be emailed to external parties that do not have access to my hard drive) and the following code is displaying the first chart correctly but subsequent ones 2,3,4 etc are showing as the little square with an x in it. What change to my code below do I need to make?

Thanks for advice.


Code:
Sub macro1


Dim olMail As Outlook.MailItem
Dim olapp As Outlook.Application
Dim wEditor As Word.Document

    Application.ScreenUpdating = False
    Application.DisplayAlerts = False

Set olapp = CreateObject("Outlook.Application")
Set olMail = olapp.CreateItem(0)
    
    olMail.Display
Set wEditor = olapp.ActiveInspector.WordEditor

With olMail
    .To = "abs@xyz.com"

    olMail.Subject = "xyz"
   

    .HTMLBody = .HTMLBody & "\\local\chart1.png"_
    "\\local\chart2.png" _
    "\\local\chart3.png"
     

    
    
    .Display
End sub
 
Last edited:
Oh I see. Unfortunately, I don't know why that's the case. As a workaround, you can always re-name the files so they don't contain spaces, maybe replacing them with underscores ( _ ) . Also, it looks like you'll need to make sure that the path doesn't contain spaces either.
 
Last edited:
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,223,749
Messages
6,174,275
Members
452,553
Latest member
red83

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top