A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Macro: Create New Message and Auto populate To Field



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 29th 09, 06:15 PM posted to microsoft.public.outlook.program_vba
geosptial
external usenet poster
 
Posts: 1
Default Macro: Create New Message and Auto populate To Field


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

Should open new mail message. In the To Field the addresses
; ; ; ;
.

Thanks


--
geosptial
------------------------------------------------------------------------
geosptial's Profile:
http://www.thecodecage.com/forumz/member.php?userid=583
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120662

Ads
  #2  
Old July 29th 09, 07:56 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Macro: Create New Message and Auto populate To Field

Sub MakeMail()
Dim msg as Outlook.MailItem
Set msg = Application.CreateItem(olMailItem)
msg.To = ; ; ; " & _
;
"
msg.Display
End Sub

--
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" wrote in message
...

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

Should open new mail message. In the To Field the addresses
; ; ; ;
.



  #3  
Old July 29th 09, 08:46 PM posted to microsoft.public.outlook.program_vba
geosptial[_2_]
external usenet poster
 
Posts: 1
Default Macro: Create New Message and Auto populate To Field


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.


--
geosptial
------------------------------------------------------------------------
geosptial's Profile: http://www.thecodecage.com/forumz/member.php?userid=583
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120662

  #4  
Old July 29th 09, 09:22 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Macro: Create New Message and Auto populate To Field

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" wrote in message
...

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.



"Sue Mosher [MVP]" wrote in message
...
Sub MakeMail()
Dim msg as Outlook.MailItem
Set msg = Application.CreateItem(olMailItem)
msg.To = ; ; ; " & _
;
"
msg.Display
End Sub

"geosptial" wrote in message
...

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

Should open new mail message. In the To Field the addresses
; ; ; ;
.





  #5  
Old August 14th 09, 12:21 AM posted to microsoft.public.outlook.program_vba
Chris A
external usenet poster
 
Posts: 1
Default Macro: Create New Message and Auto populate To Field



"Sue Mosher [MVP]" wrote:

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" wrote in message
...

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.



"Sue Mosher [MVP]" wrote in message
...
Sub MakeMail()
Dim msg as Outlook.MailItem
Set msg = Application.CreateItem(olMailItem)
msg.To = ; ; ; " & _
;
"
msg.Display
End Sub

"geosptial" wrote in message
...

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

Should open new mail message. In the To Field the addresses
; ; ; ;
.







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??
  #6  
Old August 14th 09, 03:04 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Macro: Create New Message and Auto populate To Field

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Chris A" Chris wrote in message
...
snip
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??


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate task field based on value of other field jparker Outlook and VBA 9 March 12th 09 04:50 PM
Help needed to auto populate Subject field -Outlook 2003 custom ms Mr Reorg Outlook - Using Forms 6 August 2nd 08 05:41 PM
Populate Message field based on custom field Kryer Outlook - Using Forms 8 September 7th 07 11:19 PM
How auto populate contact list from forward message in outlook ? Dan Outlook - Using Contacts 2 June 17th 06 10:27 PM
Populate Company field from Contact field in custom task form Sue Mosher [MVP-Outlook] Outlook - Using Forms 0 January 20th 06 08:37 PM


All times are GMT +1. The time now is 09:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.