GroupWise Cool Solutions Web Site
Novell DeveloperNet
Open Directory Cool Site!

Applet Focus
Advansys Formativ gives you the power to make GroupWise work the way you want! To help you understand what is possible with Formativ, read on for an insight into a particular solution and how it can help you. We discuss how it works and offer some suggestions for extending its functionality even further.

Featured Solution:

Add entry to Address Book


How does this applet benefit me?

When you receive a mail message, would you like a quick way to add the sender's details to a GroupWise personal address book? The Add entry to Address Book delivers this capability. The applet can save you time by automatically populating key fields, such as First Name, Last Name, Organization, Email Address and Country, from the sender's email address. So the next time a new message arrives, to add the sender to an address book just select the message, run the applet, complete the required fields and it's done!


The Add entry to Address Book applet can be downloaded from the Formativ Solutions Download page .

How does it work?

After selecting or opening a mail message, when you run the applet a dialog appears similar to that which is shown in Figure 1 below. The applet will extract as much information as possible from the sender's email address and will automatically populate one or more of the dialog's fields, usually First Name, Last Name, Display Name, Organization, Email Address and Country. The Email Type will be automatically set to INTERNET for an Internet address or NGW for a GroupWise address. The number of fields populated and the accuracy of the initial data will depend on the content and format of the sender's email address.

The message body text will also be copied to the Comment field, which can then be modified, used to copy information to other key fields (such as phone number etc.), or the comment text can be deleted if not required.

Once you have completed the desired address book fields, you select the target address book (from the drop down list) to which the new entry will be added. Pressing Next >> button commits the new entry to your selected address book. If the any entry already exists with the same email address, then you will be asked if you wish to replace the existing entry.

Figure 1 - Add the sender details to an address book

One of Formativ's key strengths is its ability to execute applets, with point and click simplicity, from just about any toolbar, menu or event in GroupWise - and absolutely no programming is required!

The Add entry to Address Book applet is integrated with the GroupWise main toolbar, and the main and mail view right mouse context menus. The check box at the bottom of the dialog indicates that the applet will appear on the Formativ Run menu, which can be found under the main Applets menu. See Figure 2 below.

Figure 2 - Formativ Integrations

Take a look at the Formativ User's Guide to see just how easy it is to integrate applets with GroupWise.

Applet operation

When the applet starts it checks that you have selected a message in the message list or you have an open message view. If so, it reads all your address book names, extracts and attempts to parse the sender's email address into the key information fields - First Name, Last Name, Display Name, Organization, Email Address and Country.

The success of the automatic parsing for populating the key fields depends on the content and format of the sender's email address. For example, in Figure 1 above the sender's email address enables the applet to guess that the first name is Adam, last name is Smith, display name is Adam Smith and the email address is However, as Adam has used a third party email address rather than his organization's email address, it would incorrectly decide that the organization field should be 'Myrealbox'. In this case you need to manually correct the information and the example above we changed it to Acme Inc.. As the '.com' domain suffix it too generic, the Country field will not be populated automatically. However, if '.uk' was present, the Country would be set to United Kingdom.

As the input dialog is modal, which means that you can't switch back to GroupWise until the dialog is dismissed, the applet copies the message body text into the Comments memo field. This allows you to copy and paste information into other fields or just keep any message text in the Comments field which may be relevant to the sender.


Checking for a valid GroupWise message

The If Client.ClientState.SelectedMessages.Count > 1 then command first checks to see if more than one message is selected and, if so, returns FALSE because the applet will only process one message each time it is run. The Set Msg = Client.ClientState.CommandMessage sets the Msg object equal to the currently active or selected message in the GroupWise client. The check if Msg is Nothing then identifies that if the Msg object is empty, then display a message, otherwise continue executing the applet.

Parsing the sender's address

As the dialog is being created in Function SetupIntroDlg, the following functions are called:

sEmailAddress = GetEmailAddress(Msg.Sender.EmailAddress, sDisplayName): This function extracts the sender's basic email address from the message. If it is an Internet email address, it removes any prefix text and the "<",">" characters.
GetFirstName, GetLastName, GetCountryName, GetOrganizationName, GetDisplayName and GetEmailAddress are all specific parsers for their related fields. The StringCap function is used to force the text into proper case for the name and organization fields.

Adding the entry to the address book

The subroutine AddEntryIntoAB is the main processing for adding the dialog fields into the personal address book. Key functions to note are the Set entriesObj = sEntryObj.Find(sFilter), where sFilter = "(<E-Mail Address> MATCHES """ + + ECtl.Text + """)", which checks the target address book for an existing entry with the same email address. Similarly, as adding a person entry will automatically create an Organization entry, the Set OrganizationsObj = sEntryObj.Find(sFilter), where sFilter = "(<Name> MATCHES """ + OrgCtl.Text + """)" checks to see if any Organizations already exist with the same name. If duplicate Organization entries exist then the duplicate will be deleted.

The Add entry to Address Book could possibly be extended by defaulting the target address book to one which is more commonly used. You could also add a field for Home phone number, Screen Name or even support for custom address book fields. In addition, you could default a '.COM' address to automatically enter United States in the Country field.


The Add entry to Address Book applet can be downloaded from the Formativ Solutions Download page .


The applet should be copied to the Formativ local applets folder, the default being c:\program files\advansys\formativ\local\ and then restart the GroupWise client.


For personal use, the installation procedure described above is sufficient. To share the same applet easily, you may also install Formativ Admin or Formativ Client so that the Local applets folder points to a shared network folder. This is useful for users, perhaps within a particular department, who wish to run the same applets. For fast, flexible and secure distribution at a corporate level, it is recommended that network and GroupWise administrators implement Formativ's eDirectory capabilities.

If you have any questions on this applet or you have a need for a different applet, feel free to post a question or comment in the Advansys Formativ Support Forums by clicking on the following link:

Developing Solutions with Formativ

  Add entry to Address Book

  Add or Edit Message Note

  DWS Go to sender's Web page

  Formativ Stationery

  Publish Folder List to Microsoft Word

  Multiple Signatures

  Virus Alert

Cool Solutions
Copyright © 2014 Advansys Pty Limited