View Single Post
  #6  
Old March 13th 08, 10:15 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Reading from subject and writing to "To"

There are MailItem.To and MailItem.CC properties that you can put addresses
in. It's best to use the MailItem.Recipients collection to add/remove
message recipients though, as you can use the Resolve method to validate the
e-mail addresses.


--
Eric Legault - MVP - Outlook
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, WSS 3
Application Development, MOSS 2007 Application Development)
Blog: http://blogs.officezealot.com/legault
Try Picture Attachments Wizard for Outlook!
http://www.collaborativeinnovations.ca

wrote in message
...
On 27 Feb, 21:25, "Eric Legault [MVP - Outlook]"
wrote:
Hi Max. ActiveInspector.CurrentItem will get you the MailItem object for
the open e-mail. MailItem.Subjectwill get you thesubjectline.

Toreference an external file, use the functions from the VBA.FileSystem
class or use the TextStreamObject from the Microsoft Scripting Runtim
Library.

Eric


Thanks Eric,

And how do I write to the To and Cc line?


Max


Ads