Discussion Locked

Outlook Extension

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I want to write an Outlook Extension for myself but I need help with how to do it. I'm using Visual Studio .Net to write a COM Add-in in Visual Basic. I used the wizard so the basic add-in works. My question is how can my add-in be notified when a new message arrives so that it can handle the messages before the Message Rules get at them.

Thanks for any help.

9 replies

by dklippert

Also:
OL2000: How to Create a COM Add-in for Outlook

http://tinyurl.com/293k

OL2002: How to Create a COM Add-in for Outlook

http://tinyurl.com/293l

OL: A Sample COM Add-in That Uses the Visual Basic 6.0 Add-in Template

http://tinyurl.com/293o

HOWTO: Build an Office 2000 COM Add-In in Visual Basic

http://tinyurl.com/293q

Overview of Programming with Rules Q324568
Overview of Rules
Existing Solution or Product
Rules Wizard "Run a script" Rules
Outlook Visual Basic for Applications Rules
Outlook COM Add-in Rules
Custom Actions for the Outlook Rules Wizard
Server-Side Rules Using Exchange Event Scripts and Sinks
Exchange SDK Rule Component

http://tinyurl.com/293s

by estvb

Thanks for all the articles. I'd seen some of them but most were new. Unfortunately they didn't really help me with this particular problem. Most of the examples I've found only tell you how to get started making a COM add-in but don't go into any specifics for Outlook 2000 and the rest don't say anything about handling new messages. Thanks anyway.

by estvb

Here's more detail on the problem I'm facing right now. I have the general COM Add-in and it seems to start up fine with Outlook (verified by a message box that pops up in the OnConnection event. The problem is that I'm trying to write a handler for the Outlook.Application NewMail event so I used this code:

---
Dim WithEvents oApp As Outlook.Application

Private Sub OnConnection(ByVal application As Object, ...) ...
oApp = application
End Sub

Private Sub oApp_NewMail() Handles oApp.NewMail
MsgBox("New mail")
End Sub
---

However with this code the add-in never gets loaded. Any suggestions?

by estvb

Thanks for the help and link, but I think I found the problem and have it working now. "Handles" seems to be doing the job.

This discussion is closed to new replies.