How to Create Contact Item in Outlook Using G-Lock Email Processor
When you receive emails from your subscribers, you may want to add their email addresses, names, phone numbers, postal addresses and more to your address book in Microsoft Outlook. Now you can do this without typing them in one by one. With our G-Lock Email Processor you can create a contact in Outlook using the recipient's data extracted from incoming email automatically and make your job easier.
G-Lock Email Processor has the Distributable version of Outlook Redemption.
Redemption is the most complete set of the options available for doing things not available in the Outlook object model and as a way to bypass the Outlook security.
Redemption supports Outlook 98, 2000, 2002, 2003, 2007 and 2010. You can read more about Redemption here.
Using Redemption in the Script Processor component in G-Lock Email Processor you can:
- create contact item in Outlook
- convert email into task in Outlook
- create note item in Outlook
- convert email into appointment item in Outlook calendar
- and more…
To avoid problems with the installation/uninstallation of other programs which may also include Redemption, G-Lock Email Processor uses a custom version of DLL. This entails some changes in the code:
– use GLSMAPI instead of the Redemption object
– all objects must have the GLS_ prefix
For instance, instead of writing this:
set Session = CreateObject("Redemption.RDOSession")
set Session = CreateObject("GLSMAPI.GLS_RDOSession")
Below is an example of the code that you can use in the Script Processor component in G-Lock Email Processor to create a contact item in Outlook.
The script creates a new contact in the Outlook address book using the recipient's email address and name extracted from the email. Plus, it creates a custom field in the contact profile called "Email Subject" which contains the subject extracted from the email.
function main() set Session = CreateObject("GLSMAPI.GLS_RDOSession") Session.Logon set ContactFolder = Session.GetDefaultFolder(10) ' olFolderContact ' If you want to add contact to the custom folder use method Session.GetFolderFromPath ' set ContactFolder = Session.GetFolderFromPath("Personal FoldersContactsOne More Contact Folder") set Contact = ContactFolder.items.add ' Filling standart properties (fields) Contact.Email1Address = Fields.FieldValue("Email") Contact.FullName = Fields.FieldValue("Name") ' Filling custom properties (fields) Set CustomField = Contact.UserProperties("Email Subject") if CustomField is Nothing Then Set CustomField = Contact.UserProperties.add("Email Subject", 1) End IF CustomField.Value = Fields.FieldValue("Subject") Contact.Save Session.logoff end function
We have setup the rule called "Working with Outlook" and included it into the default G-Lock Email Processor installation. Simply download G-Lock Email Processor, install it and you will find the codes to create a contact item, a task item, a note item and an appointment item in Outlook calendar inside that rule.