/**
* Script: addPABEntry.js
* Purpose: Adds an SMTP address to the personal address book
* of the profile that is opened.
* Author: Daren Thiel
* Date: 23 November 1998
*
* Note: Rename this file addPABEntry.js
*
* Comments: There a several fields of information that can be
* added to the address book, I have only used two.
**/
/* Create a MAPI Session Object */
omapi = new ActiveXObject("MAPI.Session");
/* Open the profile of where we want to store the address */
omapi.Logon("Microsoft Outlook Internet Settings");
/* Create an Address Book Object */
objpab = omapi.AddressLists("Personal Address Book");
/* Add an SMTP address with the display name "John Doe" */
objpabnew = objpab.AddressEntries.Add("SMTP", "John Doe");
/* Set the Email address */
objpabnew.Address = "jdoe@anywhere.com";
/* Save the data with Update() */
objpabnew.Update();
/* Tell the user we are done */
WScript.Echo( "Done" );