![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I've never written a VBA macro for Outlook, so I don't know where to
begin. I need to a macro that reads text from an external file and puts it into the To box of the active message. The file it reads from is dependant on the contents of the Subject line, so I need to know how to reference this as well. Any help would be very, very much appreciated! Thanks! Max |
#2
|
|||
|
|||
![]()
Hi Max. Are you familiar with Visual Basic? If you are a programmer I can
certainly help you build this solution. -- 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 ... I've never written a VBA macro for Outlook, so I don't know where to begin. I need to a macro that reads text from an external file and puts it into the To box of the active message. The file it reads from is dependant on the contents of the Subject line, so I need to know how to reference this as well. Any help would be very, very much appreciated! Thanks! Max |
#3
|
|||
|
|||
![]()
On 20 Feb, 18:09, "Eric Legault [MVP - Outlook]"
wrote: Hi Max. *Are you familiar with Visual Basic? *If you are a programmer I can certainly help you build this solution. -- 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 ... I've never written a VBA macro for Outlook, so I don't know where to begin. I need to a macro that reads text from an external file and puts it into the To box of the active message. The file it reads from is dependant on the contents of theSubjectline, so I need to know how to reference this as well. Any help would be very, very much appreciated! Thanks! Max- Hide quoted text - - Show quoted text - I'm very familiar with VB. I just haven't coded VBA for Outlook before and so don't know the properties, methods, functions, etc specific to Outlook. |
#4
|
|||
|
|||
![]()
Hi Max. ActiveInspector.CurrentItem will get you the MailItem object for
the open e-mail. MailItem.Subject will get you the subject line. To reference an external file, use the functions from the VBA.FileSystem class or use the TextStreamObject from the Microsoft Scripting Runtim Library. Eric wrote in message ... On 20 Feb, 18:09, "Eric Legault [MVP - Outlook]" wrote: Hi Max. Are you familiar with Visual Basic? If you are a programmer I can certainly help you build this solution. -- 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 ... I've never written a VBA macro for Outlook, so I don't know where to begin. I need to a macro that reads text from an external file and puts it into the To box of the active message. The file it reads from is dependant on the contents of theSubjectline, so I need to know how to reference this as well. Any help would be very, very much appreciated! Thanks! Max- Hide quoted text - - Show quoted text - I'm very familiar with VB. I just haven't coded VBA for Outlook before and so don't know the properties, methods, functions, etc specific to Outlook. |
#5
|
|||
|
|||
![]()
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 |
#6
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Showing "BCC" and not showing "From" when writing new mail | [email protected] | Outlook - General Queries | 1 | December 27th 07 09:36 PM |
Writing Word letters from "Contacts" in Outlook | VKS | Outlook - Using Contacts | 5 | December 18th 07 06:48 PM |
CANNOT EDIT "TO" "CC" & "SUBJECT" FIELDS...HELP! | DJDeals.com | Outlook Express | 3 | November 8th 07 03:59 AM |
draft e-mails not printing "to" and "subject" fields | Jianni | Outlook - Using Forms | 0 | May 2nd 07 10:51 AM |
Insert "subject" into the "first name" field of contact | Luc | Outlook - Using Forms | 1 | July 19th 06 11:31 PM |