COM Add-In for Outlook HELP

  • Thread starter Thread starter Rafael Chemtob
  • Start date Start date
R

Rafael Chemtob

Hi,
I am building a COM add-in for Outlook to check the subject and body of
e-mails as they arrive for certain values.
I am currently using another COM add-in to navigate users to "Outlook Today"
when they launch Outlook. The code looks like the following:
***************************
Dim objOL As Outlook.Application

Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal
ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As
Object, custom() As Variant)
If Not Application Is Nothing Then
Set objOL = Application

Dim objFolder As Outlook.MAPIFolder
Set objFolder = objOL.Session.GetDefaultFolder(olFolderInbox).Parent
If Not objFolder Is Nothing Then
If objOL.Explorers.Count > 0 Then
Set objOL.ActiveExplorer.CurrentFolder = objFolder
End If
End If

Set objOL = Nothing
End If

End Sub

**************************

the code executes when users launch outlook. I need to have a method called
when users send and receive e-mails.
Please advise.
Rafael
 
Check out the application-wide ItemSend event for sending and ItemAdd
on the Items collection of the Inbox for receiving.

Also, download and study various best practices for COM addins for
Outlook in the ItemsCB sample on the Resources page at
www.microeye.com
 
Rafael Chemtob said:
I am currently using another COM add-in to navigate users to "Outlook
Today" when they launch Outlook.

Why, when that option already exists in Tools>Options>Other>Advanced
Options?
 
Back
Top