Displaying multiple emails - they all go into one email?

Steph77

Board Regular
Joined
Sep 18, 2014
Messages
119
Hi - me again!

I'm trying to send emails to several suppliers based on the data from a workbook. I've got pretty much all the way there by myself but the problem I'm having is that I need to display the emails before sending and when I ask excel to display the emails it simply adds all the attachments into a single email instead of creating a new email for each attachment.

In case that wasn't clear, I have (for instance) 5 suppliers, A, B, C, D and E. I want to send 5 emails, one to each, containing the appropriate workbooks 1, 2, 3, 4 and 5. I need to make minor changes to the email body before sending so I need to display each email in turn. At the moment my code ends up displaying one email, addressed to E, with all 5 workbooks attached.

Is there any way to get VBA to tell outlook to open a NEW email message, instead of just adding onto the currently open draft message?

My code is as follows:

Code:
Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

.... some other stuff....

... then inside a for next loop: ...

With OutMail
   .To = ActiveSupplierEmail
   .CC = EmailCC
   .BCC = ""
   .Subject = EmailSubject
   .Body = EmailBody
   .Attachments.Add (SupplierBookPath)
   .Display
End With

Many thanks in advance for any assistance :)
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Steph77

Board Regular
Joined
Sep 18, 2014
Messages
119
It already is inside the for next loop. Each time it goes round the loop it just adds the next attachment to the current email instead of starting a whole new email.

Edit - sorry I see what you mean - my bad will try it
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,016
Messages
5,834,947
Members
430,329
Latest member
asmith75

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
Top