Script to open new email & add contacts & attachment

G

Guest

I am comfortable with VBA for Excel. Now I want to move beyond Excel. I
would like to add something to my code that, after saving the file, will open
an Outlook email, enter a specific distribution list from my contacts and
attach the excel file. I know that's a lot to ask for, but just a starting
point (e.g. the VBA script to open a new email) would be helpful.

Anyone? Thanks.
 
M

Michael Bauer

Hi,

as for Excel there is an Object Browser available for OL, too. Just
press F2 and switch from <All Libraries> to <Outlook>.

Your keywords are:
- Application.CreateItem
- GetDefaultFolder(olFolderContacts).Items("NameOfYourDL")
- MailItem.Recipients.Add
- MailItem.Attachments.Add
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top