WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Macro: Create New Message and Auto populate To Field

 
   Home -> Office -> Programming VBA RSS
Next:  merging two large spreadsheets  
Author Message
geosptial

External


Since: Jul 29, 2009
Posts: 1



(Msg. 1) Posted: Wed Jul 29, 2009 1:05 pm
Post subject: Macro: Create New Message and Auto populate To Field
Archived from groups: microsoft>public>outlook>program_vba (more info?)

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
test1 RemoveThis @yahoo.com; test2 RemoveThis @yahoo.com; test3 RemoveThis @yahoo.com; test4 RemoveThis @yahoo.com;
test5 RemoveThis @yahoo.com.

Thanks


--
geosptial
------------------------------------------------------------------------
geosptial's Profile: http://www.thecodecage.com/forumz/member.php?userid=583
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=120662
Back to top
Login to vote
Sue Mosher [MVP]

External


Since: Mar 24, 2009
Posts: 22



(Msg. 2) Posted: Wed Jul 29, 2009 1:56 pm
Post subject: Re: Macro: Create New Message and Auto populate To Field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sub MakeMail()
Dim msg as Outlook.MailItem
Set msg = Application.CreateItem(olMailItem)
msg.To = "test1@yahoo.com; test2.TakeThisOut@yahoo.com; test3.TakeThisOut@yahoo.com; " & _
"test4@yahoo.com; test5.TakeThisOut@yahoo.com"
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" <geosptial.3w3fld.TakeThisOut@thecodecage.com> wrote in message
news:geosptial.3w3fld@thecodecage.com...
>
> 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
> test1.TakeThisOut@yahoo.com; test2.TakeThisOut@yahoo.com; test3.TakeThisOut@yahoo.com; test4.TakeThisOut@yahoo.com;
> test5.TakeThisOut@yahoo.com.
Back to top
Login to vote
geosptial

External


Since: Jul 29, 2009
Posts: 1



(Msg. 3) Posted: Wed Jul 29, 2009 3:05 pm
Post subject: Re: Macro: Create New Message and Auto populate To Field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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/showthread.php?t=120662
Back to top
Login to vote
Sue Mosher [MVP]

External


Since: Mar 24, 2009
Posts: 22



(Msg. 4) Posted: Wed Jul 29, 2009 3:22 pm
Post subject: Re: Macro: Create New Message and Auto populate To Field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <geosptial.3w3mj4.TakeThisOut@thecodecage.com> wrote in message
news:geosptial.3w3mj4@thecodecage.com...
>
> 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]" <suemvp.TakeThisOut@turtleflock.com> wrote in message
news:eBP8qXHEKHA.5092@TK2MSFTNGP03.phx.gbl...
> Sub MakeMail()
> Dim msg as Outlook.MailItem
> Set msg = Application.CreateItem(olMailItem)
> msg.To = "test1@yahoo.com; test2.TakeThisOut@yahoo.com; test3.TakeThisOut@yahoo.com; " & _
> "test4@yahoo.com; test5.TakeThisOut@yahoo.com"
> msg.Display
> End Sub
>
> "geosptial" <geosptial.3w3fld.TakeThisOut@thecodecage.com> wrote in message
> news:geosptial.3w3fld@thecodecage.com...
>>
>> 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
>> test1.TakeThisOut@yahoo.com; test2.TakeThisOut@yahoo.com; test3.TakeThisOut@yahoo.com; test4.TakeThisOut@yahoo.com;
>> test5.TakeThisOut@yahoo.com.
>
>
Back to top
Login to vote
Chris A

External


Since: Aug 13, 2009
Posts: 1



(Msg. 5) Posted: Thu Aug 13, 2009 3:21 pm
Post subject: Re: Macro: Create New Message and Auto populate To Field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"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" <geosptial.3w3mj4 RemoveThis @thecodecage.com> wrote in message
> news:geosptial.3w3mj4@thecodecage.com...
> >
> > 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]" <suemvp RemoveThis @turtleflock.com> wrote in message
> news:eBP8qXHEKHA.5092@TK2MSFTNGP03.phx.gbl...
> > Sub MakeMail()
> > Dim msg as Outlook.MailItem
> > Set msg = Application.CreateItem(olMailItem)
> > msg.To = "test1@yahoo.com; test2 RemoveThis @yahoo.com; test3 RemoveThis @yahoo.com; " & _
> > "test4@yahoo.com; test5 RemoveThis @yahoo.com"
> > msg.Display
> > End Sub
> >
> > "geosptial" <geosptial.3w3fld RemoveThis @thecodecage.com> wrote in message
> > news:geosptial.3w3fld@thecodecage.com...
> >>
> >> 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
> >> test1 RemoveThis @yahoo.com; test2 RemoveThis @yahoo.com; test3 RemoveThis @yahoo.com; test4 RemoveThis @yahoo.com;
> >> test5 RemoveThis @yahoo.com.
> >
> >
>
>
>

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??
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2977



(Msg. 6) Posted: Fri Aug 14, 2009 9:04 am
Post subject: Re: Macro: Create New Message and Auto populate To Field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 A RemoveThis @discussions.microsoft.com> wrote in message
news:FB053C58-801C-489E-8EA2-45A561894A71@microsoft.com...
<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??
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Programming VBA All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support