Microsoft KB Archive/198725

= The AdContac.exe sample is available which can be used to add sender information of incoming message to contacts =

Article ID: 198725

Article Last Modified on 8/30/2004

-

APPLIES TO


 * Microsoft Exchange Development Kit 5.5
 * Microsoft Exchange Server 2003 Software Development Kit
 * Microsoft Outlook 2002 Standard Edition

-



This article was previously published under Q198725



SUMMARY
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++.



MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

Download AdContac.exe now

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.</li> 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.</li> Select the option that you want, and then provide the condition to which you want the rule to respond.</li> Click Next after you have provided the condition that will trap a message.</li> Click Perform a Custom Action.</li> Click a custom action in the Description box, and then click AddSenderToContacts in the drop-down list.</li> 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: <ol style="list-style-type: lower-alpha;"> Cancel the rule setup and return to the Outlook Explorer shell.</li> Right-click the Contacts folder, and then click Properties.</li> In the Properties dialog box, on the Outlook Address Book tab, click Show this folder as an e-mail address book.</li></ol> </li> Click Next and select any exceptions that you want to apply to this rule.</li> Click Next, and then type a name for this rule.</li> Make sure that the Turn on this Rule box is selected.</li> Verify that all of the settings are correct, and then click Finish.</li> 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.</li></ol>

You can use the included Microsoft Visual C++ project and source code as a template for other custom actions.

Keywords: kbhowto kbdownload kbgraphxlinkcritical kboutlookobj kbmsg kbfile kbsample kbconfig kbfaq kbcontacts KB198725

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.