Macro: Create New Message and Auto populate To Field

G

geosptial

I need a macro that will open up a new message with the TO field alread
filled in with 5 email addresses. For example;

Should open new mail message. In the To Field the addresse
(e-mail address removed); (e-mail address removed); (e-mail address removed); (e-mail address removed)
(e-mail address removed).

Thank
 
S

Sue Mosher [MVP]

Sub MakeMail()
Dim msg as Outlook.MailItem
Set msg = Application.CreateItem(olMailItem)
msg.To = "(e-mail address removed); (e-mail address removed); (e-mail address removed); " & _
"(e-mail address removed); (e-mail address removed)"
msg.Display
End Sub
 
G

geosptial

That worked awesome. I appreciate the help. What would i have to chang
to have those same emails go into the to field on a forwarded email
 
S

Sue Mosher [MVP]

If you have a message already open, return it with this statement:

Set msg = Application.ActiveInspector.CurrentItem

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


geosptial said:
That worked awesome. I appreciate the help. What would i have to change
to have those same emails go into the to field on a forwarded email.
 
C

Chris A

Sue Mosher said:
If you have a message already open, return it with this statement:

Set msg = Application.ActiveInspector.CurrentItem

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54

How can I get this same thing to work, but instead of inserting email
address, I need it to insert a subject in the subject line??
 
K

Ken Slovak - [MVP - Outlook]

Have you looked at the Subject property of the MailItem object in the Object
Browser?

Please don't hijack other people's threads, start your own.
 

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