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

Reading from subject and writing to "To"



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 15th 08, 09:41 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default Reading from subject and writing to "To"

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  
Old February 20th 08, 07:09 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"

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  
Old February 21st 08, 06:59 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default Reading from subject and writing to "To"

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  
Old February 27th 08, 10:25 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"

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  
Old March 13th 08, 03:58 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default Reading from subject and writing to "To"

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  
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


 




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
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


All times are GMT +1. The time now is 07:07 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.