AddToPAB.exe Add Sender of Incoming Message to the PAB

ID: Q193285


The information in this article applies to:
  • Extended Messaging Application Programming Interface (MAPI), version 1.0
  • Microsoft Outlook 98


SUMMARY

AddToPAB.exe is a self-extracting archive that contains a custom rule extension sample written with Microsoft Visual C++ 5.0 for use with Microsoft Outlook 98.

AddToPAB is a custom action .dll file for use with the Outlook 98's Rules Wizard. When a message that meets the conditions for your Inbox rule arrives, AddToPAB obtains the sender information from the message and creates a new entry in your Personal Address Book (PAB) using Extended Messaging Application Programming Interface (MAPI).

If you want to create custom actions for use with Outlook 98's Rules Wizard, then this sample will help you get started. It also gives you a working example of using the Exchange extension interfaces from Visual C++.


MORE INFORMATION

The following file is available for download from the Microsoft Download Center. Click the file name below to download the file:

Addtopab.exe
The Addtopab.exe file contains the following files:

                  AddToPAB.DLL  - Custom Action Extension DLL
                  AddToPAB.reg  - Custom Action registration file
                  crarun.cpp    - main extension source file
                  crarun.def    - definition file
                  crarun.dsp    - Microsoft Visual C++ 5.0 project file
                  crarun.dsw    - Microsoft Visual C++ 5.0 workspace file
                  crarun.h      - main extension header file
                  entry.cpp     - Microsoft Exchange extension source file 
Release Date: Oct-01-1998

For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address
http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center.

Installing and Configuring the Sample

  1. Copy the AddtoPAB.exe file to a new folder on your hard drive.


  2. Execute the AddToPAB.exe file to expand the archive.


  3. Copy the AddToPAB.dll file to your Windows\System directory or to the WINNT\SYSTEM32 directory (used by this sample).


  4. Open the AddToPAB.reg file in Notepad and change the path to reflect the actual location of the AddToPAB.dll file on your system.


  5. Save the AddToPAB.reg file and exit Notepad.


  6. Double-click the AddToPAB.reg file in Windows Explorer. This registers the AddToPAB.dll for use by Microsoft Outlook as a custom action.


  7. Switch to or start Microsoft Outlook and select the Rules Wizard from the Tools menu.


  8. Choose "New..." to add a new rule to Outlook.


  9. Select the "Check Messages when they arrive" option. Click Next.


  10. Select the desired option and enter the condition to which you want to the rule to respond.


  11. Click Next after you have entered a condition that traps a message.


  12. Select the "Perform a Custom Action" option.


  13. Click "A custom action" in the description box and select "AddSenderToPAB" from the drop-down list box.


  14. Choose "Change" and "AddToPAB" displays in the "Action Value" text box.


  15. Click Next and select any exceptions you want to apply to this rule.


  16. Click Next and enter a name for this rule.


  17. Make sure that "Turn on this Rule" is selected.


  18. Verify that all of the settings are correct and click Finish.


Test the rule by sending yourself a message or having someone else send you a message that meets the rule's conditions. The sender of the message should be added to your PAB.

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

Additional query words: kbDSupport, extension, rule, Custom Action, Outlook kbMsg kbVC kbOutlook98 kbMAPI

Keywords : kbfile kbfaq
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: January 14, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.