Automating Distribution List - OutlookXP

  • Thread starter Thread starter Devious Dude
  • Start date Start date
D

Devious Dude

I am the editor of an e-newsletter. Subscribers send me an e-mail wit
the word 'Newsletter' in the subject.

What I would like to be able to do is :-

1 Automatically add Subscriber to my Contacts with 'Newsletter' a
a category.
2 Automatically add subscriber's e-mail address to a Distributio
list, so newsletter e-mail can be sent easily.

I have some VBA experience with Access and Excel, but none whatsoeve
with Outlook. While the Rules Wizard takes care of some other action
on receipt of e-mail, the above two actions stump me at present.

Any sugestions would be welcome. I don't want to use code if there is
simpler approach, however, if code is the best option, then....(her
visualise Devious rolling up sleeves, and attacking keyboard).

De
 
There are a ton of options for automated message processing;
http://www.slipstick.com/addins/auto.htm has a great overview.

Essentially, you need the following framework in place in your
ThisOutlookSession module to trap incoming messages:

Option Explicit
Dim WithEvents NewMailItems As Outlook.Items

Private Sub Application_Quit()
Set NewMailItems = Nothing
End Sub

Private Sub Application_Startup()
Set NewMailItems =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items
End Sub

Private Sub NewMailItems_ItemAdd(ByVal Item As Object)
'THIS WILL FIRE FOR EVERY NEW E-MAIL; YOU CAN USE THE
'Item OBJECT TO WORK WITH THE PROPERTIES OF THE E-MAIL MESSAGE

Item.SaveAs "C:\Temp\mymessage.txt", olTXT
End Sub

Once you have the message, the world is your oyster. You can use the
Outlook Object model to add a new Contact, or add the e-mail of a received
message to a Distritubution list, etc. For an overview of Outlook VBA,
start at http://www.slipstick.com/dev/vb.htm or http://www.outlookcode.com.
Also, there's a trick involved in getting the sender's address from an
Outlook mail message: http://www.slipstick.com/dev/code/getsenderaddy.htm.
 
Thanks Eric, will investigate.

Wot a pity Outlook does not allow 'Record Macro', or code wizards, lik
Acces
 
Back
Top