macro add list email

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Macro to add list of email addresses to Bcc field | Excel forum

Macro to add list of email addresses to Bcc field | Excel forum

resolvedResolved · Low Priority · Version 2003

Graham has attended:
Excel Advanced course

Macro to add list of email addresses to Bcc field

I have been able to open a new email using the code shown below. What I have not been able to work out, is how to add a list of email addresses from Excel rather than typing each individual address into the code. Any ideas?

Sub Germany_Click()
Dim ol, mail As Object
Set ol = CreateObject("Outlook.Application")
Set mail = ol.CreateItem(0)
mail.Subject = "Transport " & Now
mail.To = "somebody@somewhere.com"
mail.Bcc = "I would like to have a list of addresses from Excel here"
mail.Display
End Sub

Regards,

Graham

Edited on Thu 11 Mar 2010, 09:51

RE: Macro to add list of email addresses to Bcc field

Hi Graham

Thanks for your post and detail you have included. We have reviewed and whilst a solution is available it is beyond the scope of this forum.

We recommend you attend our 2 day Excel VBA Introduction course which will give you the skills to solve the issue you have at the moment. Click here for course information.

I noticed that Susann still has a standby place available that you can take advantage of to use as either a complimentary place or heavily discounted. This would be the best course of action.

Regards

Jacob

Wed 17 Mar 2010: Automatically marked as resolved.


 

Excel tip:

Stop Formula Returning A "#DIV/0" Error

If a formula returns a #DIV/0 error message there is a way to avoid such results.

For example the formula =A1/B1 will return a #DIV/0 if B1 is empty or a zero.

If you protect your formulas with the ISERROR function, the formula will then look like this:

=IF(ISERROR(A1/B1),0,A1/B1)

In plain English: should the result of A1 divided by B1 be an error change the result to 0 else show the result of A1/B1.

View all Excel hints and tips


Server loaded in 0.1 secs.