![]() |
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
|
|||
|
|||
![]()
Is there a mechanism that allows developers to set off a VBA macro
upon the receipt of every email? (Sort of like the out-of-office mechanism but evoking a VBA macro instead of a new email message.) Also does someone have an example where this is set up and the VBA macro accesses the email content of the message that was received? I'm using Outlook 2003. Thanks. |
#2
|
|||
|
|||
![]()
You can use the ItemAdd event handler for the Items collection of the Inbox
for that. Search for "zaphtml" at www.outlookcode.com for an example of an ItemAdd handler that converts all HTML emails into plain text emails. -- 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 wrote in message ... Is there a mechanism that allows developers to set off a VBA macro upon the receipt of every email? (Sort of like the out-of-office mechanism but evoking a VBA macro instead of a new email message.) Also does someone have an example where this is set up and the VBA macro accesses the email content of the message that was received? I'm using Outlook 2003. Thanks. |
#3
|
|||
|
|||
![]()
Hi Ken,
The tip you provided lead me on a journey where I ended up installing Collaboration Data Objects. (Microsoft CDO 1.2.1 Library). This URL was helpful: http://j-integra.intrinsyc.com/suppo...aspx?id=113792 .. I followed the instructions and forturnately I was able to install from the network without a CD. Now.... 1. Where is the recommended place to put the code for Application_Startup() and olInboxItems_ItemAdd() ? Microsoft Office Outlook Objects -ThisOutlookSession- (General Module) Or anyplace, such as: Modules - Module1 2. When I log out of this account - will the AddItem code turn off? Thanks. |
#4
|
|||
|
|||
![]()
The code goes in the ThisOutlookSession class. The code is running
in-process with Outlook, so if Outlook is closed the code stops. -- 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 wrote in message ... Hi Ken, The tip you provided lead me on a journey where I ended up installing Collaboration Data Objects. (Microsoft CDO 1.2.1 Library). This URL was helpful: http://j-integra.intrinsyc.com/suppo...aspx?id=113792 . I followed the instructions and forturnately I was able to install from the network without a CD. Now.... 1. Where is the recommended place to put the code for Application_Startup() and olInboxItems_ItemAdd() ? Microsoft Office Outlook Objects -ThisOutlookSession- (General Module) Or anyplace, such as: Modules - Module1 2. When I log out of this account - will the AddItem code turn off? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
macro to email calendar | Lance Hoffmeyer | Outlook and VBA | 1 | May 27th 08 12:50 AM |
OL 2003 crashes on macro (Alt-F8) or macro editor (Alt-F11) | mikewillnot | Outlook - General Queries | 0 | May 5th 08 03:42 PM |
Outlook macro abends but Word macro runs successfully | Jreue | Outlook and VBA | 0 | December 13th 06 11:55 PM |
Call macro stored in Excel workbook from Outlook's macro | Gvaram | Outlook and VBA | 5 | October 4th 06 06:26 AM |
email forwarding macro | JTL | Outlook and VBA | 2 | February 7th 06 05:42 PM |