AdContac.exe is a self-extracting archive that contains a
custom rule extension sample that is written with Microsoft Visual C++ for use
with Microsoft Outlook.
AdContac is a custom action .dll file for
use with the Rule Wizard in Outlook. When you are configuring the custom
action, you are presented with a list of all of the Outlook Address
Book-enabled Contacts folders in the current profile. You can select a Contacts
folder from any store. When a message that meets the conditions for your Inbox
rule arrives, AdContac obtains the sender information from the message and
creates a new entry in the Outlook Address Book (Contacts) by using Extended
Messaging Application Programming Interface (MAPI).
Use this sample
to start creating custom actions for use with the Rule Wizard in Outlook. This
sample also provides a working example of how to use the Exchange extension
interfaces from Visual C++.
The
following file is available for download from the Microsoft Download
Center:
Collapse this imageExpand this image
Download AdContac.exe now
(http://download.microsoft.com/download/exch55/sample/5.5/w9x2k/en-us/adcontac.exe)
Installing and Configuring the Sample
- Compile and build AdContact.dll by using Microsoft Visual
C++.
- Copy AdContac.dll to the desired target
directory.
- Open the AdContac.reg file in Notepad and change the path
to reflect the actual location of the AdContac.dll on your computer.
- Save the AdContac.reg file, and then exit
Notepad.
- Double-click the AdContac.reg file to register the
AdContac.dll for use by Outlook as a custom action.
- Switch to or start Outlook, and then start the Rules Wizard
from the Tools menu.
- Click New to add a new rule to Outlook.
- Click Check Messages when they arrive, and
then click Next. Note: You may need to click Start from a blank rule
first before this option is available.
- Select the option that you want, and then provide the
condition to which you want the rule to respond.
- Click Next after you have provided the condition that will trap a
message.
- Click Perform a Custom Action.
- Click a custom action in the Description box, and then click AddSenderToContacts in the drop-down list.
- Click Change, and then select a Contacts folder from the list. The name of the
selected Contacts folder should be filled in the Action Value box.
Note: If your Contacts folder is not on the list:
- Cancel the rule setup and return to the Outlook
Explorer shell.
- Right-click the Contacts folder, and then click Properties.
- In the Properties dialog box, on the Outlook Address Book tab, click Show this folder as an e-mail address
book.
- Click Next and select any exceptions that you want to apply to this
rule.
- Click Next, and then type a name for this rule.
- Make sure that the Turn on this Rule box
is selected.
- Verify that all of the settings are correct, and then click
Finish.
- Test the rule by sending yourself a message that meets the
rule's conditions.
The sender of the message should be added to the
selected Contacts folder.
You can use the included Microsoft Visual C++ project and
source code as a template for other custom actions.