Applet Focus: Formativ Multiple Signatures
Novell Cool Solutions: Feature
Digg This -
Posted: 21 Dec 2001
Current version: GroupWise 6
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 the Multiple Signatures applet and how it can help you. We discuss how it works and offer some suggestions for extending its functionality even further. Bookmark this page now!
Tell me more...
How does this applet benefit me?
Generally speaking, GroupWise provides the capability to use only one signature when creating or replying to e-mail messages. GroupWise 6 extended this capability by allowing one signature per GroupWise account. But what if you need to sign your e-mail using any number of different personas? You may like (or be required) to use a formal corporate signature when creating or replying to external messages, but perhaps you would prefer to use a more casual signature when replying to collegues or friends. Many people are required to take on several roles within an organization, and need to use a different signature depending the e-mail topic.
Some people require multiple signatures for other reasons. For example, you may be a sales person and you would like to include information, just below your title, about a promotion that you are currently offering. You want this information to appear on e-mail to your customers but you don't want it to appear on e-mail to internal company staff.
What about creating signatures which contain color, graphics and formatted text? As part of a signature, some people would like use an image of their signature or name. Including a corporate logo as part of your signature is sure to leave a lasting impression. Including URL's and other information as part of a signature is a great way to get recipients to click back to your site.
The Formativ Multiple Signatures applet was developed to address these needs. The applet enables you to define any number of different signatures. Each signature can be either plain text or contain HTML formatting, including tables, colors and images, such as your corporate logo or signature. The applet is easily configured to either execute automatically when you compose or reply to a message, or when you send a message. You can even place it on a GroupWise message toolbar where it can be executed at the touch of a button. This means that you can attach your signatures to other GroupWise message types, such as appointments, tasks, phone messages and notes!
How does it work?
Here's how it looks when the applet is configured to automatically execute when you compose a new e-mail message. Lets say that you select File|New|Message from the GroupWise main menu, or press Ctrl+M to create a new message. You are working with the GroupWise HTML compose view. Formativ recognizes the event and executes the applet, which displays the signature selection dialog shown below.
Figure 1 - Multiple Signatures selection dialog
You simply click the name of the signature you wish to use and click OK. In this example we are selecting our formal signature because we are going to be sending this message to a customer. However, we could have selected any of the signatures we have created.
Once we click OK, Formativ inserts the selected signature into the newly composed e-mail message and then we can complete the message text. You can see the newly composed e-mail message, with signature included, below:
Figure 2 - New e-mail message with signature inserted
The applet exhibits a few 'smarts' when it works out where to insert the signature. Lets say you were replying to an e-mail message. As an existing message already contains text that you wish to quote in your reply, you don't want your signature to appear at the very bottom of the reply - you want it to appear above the original message text. The Multiple Signatures applet knows the difference between a reply and a new message, and inserts the signature in the correct position.
Logos and formatted text, anyone?
These days, it seems almost everybody wants to create e-mail messages that are content rich, by using color, graphics, formatting, etc.. GroupWise provides this facility via its HTML compose views, which let you create messages using HTML. The Multiple Signatures applet takes advantage of this feature by providing support for HTML signatures. For example:
Figure 3 - Graphical signature for use with HTML signatures
This means you can create signatures that contain formatted text, graphics (such as scanned signatures and company logos) and just about every other HTML feature - now that's cool!
Integrating with GroupWise
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 required! With this in mind, it is very easy to integrate the Multiple Signatures applet to make it work just the way you want. Figure 4 below shows the Formativ integrations tab. Here you can see the Multiple Signatures applet has been integrated with the e-mail view toolbar (which creates a button for you), and the e-mail On Compose event. Some of the other events and integration types, which you could also select, are visible.
Figure 4 - Formativ Integrations
Take a look at the Formativ User's Guide to see just how easy it is to integrate applets with GroupWise.
Here are a few other integration suggestions you may like to try:
E-mail On Compose Event
The E-mail On Compose event is triggered whenever you create a new e-mail message. Integrating the applet with this event means that the multiple signatures selection dialog appears whenever you create a new e-mail message. You can then select a signature, which will then be inserted into the new e-mail message.
E-mail On Reply Event
The E-mail On Reply event is triggered whenever you reply to an e-mail message. When you select a signature for a reply, you don't necessarily wish it to appear at the very end of the quoted message. The applet recognizes this fact and inserts the signature at the top of the reply, above the original text.
E-mail On Forward Event
The E-mail on Forward event is triggered whenever you forward an e-mail message.
E-mail View Toolbar
It is very easy to add a button to the e-mail toolbar which executes the applet. By positioning the cursor within a draft and pressing the button, you control exactly where your signature will be inserted.
E-mail View Context Menu
The E-mail View context menu is the popup menu which appears when you press the right mouse button over an e-mail message. Just like adding the applet to the toolbar, the context menu lets you insert a signature exactly where you want.
Other Message Types
The multiple signature applets will work with just about every GroupWise message type, including appointments, notes and tasks. Simply integrate the applet with each message type with which you wish to use signatures.
Under the Hood
The Multiple Signatures applet performs some pretty cools tricks to do its thing. A review of the applet source code reveals a few key techniques that you'll see time and time again.
Your signatures are stored in either simple text or HTML files. You can create these using any text editor. You may want to use a HTML editor to create formatted signatures. Have a look at some of the example signatures which ship with Formativ.
The applet needs to process plain text signatures a little differently from HTML signatures. For this reason, we use different file extensions to tell them apart. Plain text signatures need to be saved using a .SIG or .sig extension. HTML based signatures must be saved using a .HTS or .hts extension.
Your signature files can be located on your local PC or on your network. To change the location, simply change the value of the SIGNATURE_LOCATION constant. For example, the default value is the standard Formativ data directory, which is accessed using Utilities.GetDataDirectory.
You may want to change the SIGNATURE_LOCATION value to point to your personal directory on the network. For example, if all users have a personal directory mapped to the M: drive, you could edit the applet source so that the applet looks for signatures in a directory called 'signatures' in the personal directory on the network by using:
SIGNATURE_LOCATION = "m:\signatures\"
In order to use a HTML signature, you must be using the HTML compose view in GroupWise. The applet checks which mode you are using, and only displays the signatures which are applicable to that mode. This means that if you are using HTML compose mode, the applet displays all your .HTS and .SIG signatures. (HTML mode in GroupWise supports both formatted and plain text). If you are using plain text compose mode, only plain text (.SIG) signatures are made available. GroupWise 6 provides an option under the tools menu that lets you define your default compose mode. With GroupWise 5.5, you need to manually change the view from the View menu of the apropriate message type to select the compose mode.
Once you select the signature that you wish to use, the applet uses a variety of techniques to get the signature text into the e-mail message. These are described in more detail below. The applet also checks to see which event caused it to be executed. This means the applet can tell if you are composing a new item, performing a reply or forward. The signature text is inserted at different locations within the message depending on the context under which the applet is being executed.
Let's dive in and have a look at some of the techniques the applet uses. Remember, because you have the applet source, you are free to modify it to work just the way YOU want:File System Object
You'll notice one of the very first things the applet does is to create an instance of the Windows File System Object with the line:
Set FSO = CreateObject("Scripting.FileSystemObject")
The File system object provides you with the tools you need to access the file system. Primarily it lets you read and write files, and scan directories. The Multiple Signatures applet uses it to load the names and locations of all your signature files into a string list object so that they can be displayed in a dialog. See the SetupDlg function for details.Detecting GroupWise Commands
A key feature of the Multiple Signatures applet is its ability to know what caused it to execute within GroupWise. The applet uses this context information to modify the position where the signature data is inserted within the message.
This is done using the GWEvent parameter, which is passed to every applet. The GWEvent is a string parameter containing the name of the GroupWise command which triggered the applet. All the valid GWEvent values can be found in the Formativ Programmers Guide. The Multiple Signatures applet checks to see if this parameter contains "GW#C#REPLY", which indicates that the user was replying to a message.Detecting a valid GroupWise message
In order to add a signature to a message, we must have access to a valid GroupWise message. The applet checks for a valid message in the ValidMsg function. This function checks to see if Client.ClientState.CommandMessage contains an object. Client is another parameter passed to every applet and which contains state information from the GroupWise client. See the Programmers Guide for more information. CommandMessage is valid if an existing item is opened. If the object is empty, the applet then checks GroupWise.ComposingItem. ComposingItem represents a new item that does not yet exist in the GroupWise message store. Again, see the Programmers Guide for full details.Creating a User Interface
Formativ provides a comprehensive set of commands which you can use to easily create forms and dialogs. The SetupDlg function illustrates how a simple dialog containing a list of signatures is created.
Creating any dialog consists of three basic steps:
- Create the dialog object by calling Utilities.NewControlBoxDialog
- Add controls to the dialog object returned by NewControlBoxDialog
- Call the Execute method of the dialog object to display the dialog.
Most Formativ applets create dialogs and they represent an excellent learning reference.
Taking it Further
For those who like to tinker, or who have specialized requirements, the applet provides many possibilities. The most obvious area for customization is the management of the signature data. As mentioned previously, you control the location of the signature files by changing the value of the SIGNATURE_LOCATION constant, which stores the path to the signature files.
A signature is ultimately just a file that is inserted into a message. The file could come from anywhere. For example, It would be possible to store signature data in Novell eDirectory, and access it using Novell's ActiveX controls.
Assuming that you have an Internet connection, another interesting possibility would be to dynamically create or modify signature data prior to insertion in a message. For example, you could add current stock prices or weather information to your signature in real time. In fact, you could add information from any system which exposed its data through a COM/ActiveX interface.
This version of the Multiple Signatures applet can be downloaded from here. The applet should be copied to the Formativ local applets folder, the default being c:\program files\advansys\formativ\local\ (which overwrites the shipping applet of the same name), and then restart the GroupWise client.
- For more information about Advansys Formativ, read the Formative Introduction document.
- Advansys Formativ - A GroupWise Development Revolution - Press Release.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com