AddToPAB.exe Add Sender of Incoming Message to the PAB (193285)



The information in this article applies to:

  • Microsoft Extended Messaging Application Programming Interface (MAPI)
  • Microsoft Outlook 98

This article was previously published under Q193285

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:
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 additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

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.

Modification Type:MinorLast Reviewed:8/25/2005
Keywords:kbdownload kbFAQ kbfile kbgraphxlinkcritical kbinfo KB193285 kbAudDeveloper