Skip to main content

Helping Your Users to Create HTML Signatures

I was a little stuck for new Notes material for this blog until I read the brilliant Alan Lepofsky's article on creating Signature files for Lotus Notes.

Full URL of his Article
http://www.alanlepofsky.net/alepofsky/alanblog.nsf/dx/creating-a-simple-html-signature-file

His article provides a simple step-by-step guide to creating a signature using HTML and is very easy to follow but, as Notes Administrators and Developers, I feel that we have greater responsibility to protect our lower-level users from any kind of programming, so I'm going to post some code that I've been using.

Where to put the Code
Originally, I had this code built-in to our corporate mail template. You can do this if you want but the problem with building things into the mail template is that you have to remember to carry them through to the any new templates whenever you upgrade.

A more elegant solution IMHO is to put the code into an instruction manual.


My Instructions
The following are the instructions on my "document".


The following procedure will simplify installation of your signature and disclaimers.

Please note the following;


  • You need to perform steps 1-7 the first time, but can make changes in future by doing only step 1.

  • You do not have to supply your three digit telephone extension.

  • You do not have to supply a mobile number.

  • Your email address is a system guess... check (and retype if required) before accepting.



Having done the procedure, you can test it by creating a new mail memo.

Steps to Complete


  1. Click the button on the Right and answer the questions it asks.

  2. From the Lotus Notes menu, select Tools, and then Preferences.

  3. Click on the tab marked Signature

  4. Tick the box marked [x] Automatically append a signature to the bottom of my outgoing mail messages

  5. Select the option marked (o) HTML or Image File

  6. In the File section type: H:\NotesSig.html

  7. Click on the button marked OK




The Code
Please remember that I can't use HTML here so please replace all instances of { and } with <>.

I then have a button which contains the following code...


Sub Click(Source As Button)

Dim YourName As String
Dim DefaultName As Variant
Dim YourPosition As String
Dim DBName As String
Dim DefaultEmail As Variant
Dim YourEmail As String
Dim YourMobile As String
Dim YourExtension As String
Dim Session As New NotesSession

DefaultName = Session.CommonUserName

YourName = Inputbox$ ("What is your Name: " ,"Full Name" , DefaultName)
YourPosition = Ucase$(Inputbox$ ("What is your Job Title: " ,"Job Title" , ""))
DBName = Session.CurrentDatabase.FileName
DefaultEmail = Trim$(Left$(DBName, (Len(DBName) - 4))) + "@mydomain.com"
YourEmail = Inputbox$("What is your Email Address" , "Email" , DefaultEmail)
EmailLine = "{A HREF=" + Chr$(34) + "MailTo:" + YourEmail + Chr$(34) + "}" + YourEmail + "{/A}{br}"
YourExtension = Inputbox$("Enter the (three digit) extension for your direct number (or blank for none): ", "Phone")
YourMobile = Inputbox$("Enter your mobile number (or blank for none): ", "Mobile Phone")

Open "H:\NotesSig.html" For Output As #1
Print #1, "{FONT FACE="+ Chr$(34) + "Default Sans Serif"+ Chr$(34) +" SIZE=2}{br}{br}{br}{B}"
Print #1, YourName
Print #1, "{/B}{br}"
Print #1, YourPosition
Print #1, "{br}My Company Name{br}{br}Email:"
Print #1, EmailLine

If Trim$(YourExtension) {} "" Then
Print #1, "Phone: 61 2 9216 4" + YourExtension + "{br}"
End If

If Trim$(YourMobile) {} "" Then
Print #1, "Mobile: "+ YourMobile + "{br}"
End If

Print #1, "{br}{br}{hr}{br}{/FONT}{FONT FACE="+ Chr$(34) + "ARIAL"+ Chr$(34) +" SIZE=1}"

Print #1, "This message may contain confidential and/or privileged information, and is intended only for the use of the addressee(s) named above. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. If you have received this message in error, please notify us immediately, by telephone (Sydney 61 2 9999 5555) or e-mail ({A HREF=" + Chr$(34) + "Mailto:support@mydomain.com" + Chr$(34) + "}support@mydomain.com{/A})."

Print #1, "{br}{br}{B}My Company Name{/B}{br}"
Print #1, "ABN: xx xxx xxx xxx{br}"
Print #1, "Level 99, 01 Location Street SYDNEY NSW 2000{br}"
Print #1, "Phone: 61 2 9999 5555{br}Fax: 61 2 9999 6666{br}"
Print #1, "Web Site: {A HREF=" + Chr$(34) + "http://www.mydomain.com" + Chr$(34) + "}www.mydomain.com{/A}{br}"
Print #1, "{br}{hr}{/FONT}"

Close #1

Msgbox "You can now do Step 2 onward",64,"Finished"

End Sub



Obviously, you'll need to modify the domain name and addresses fields.

You'll probably want to change the storage location (I use the user's Home (H:) drive so that Notes signatures follow them around the network. Laptop users should use the Local Drives (C:/D:) for obvious reasons.

Also, you might want to remove the disclaimer information depending upon where your disclaimer is attached. (if it is attached at server-level).

Improvements
This code is far from perfect and some of the things I think could be done to improve it include;


  • Doing a lookup of the name to retrieve the email address.

  • Programmatically turn the HTML file options on in the Notes local address book.



Hope you can benefit from this code.

Comments

Popular posts from this blog

How to Change Your Notification Options for New Lotus Notes Mail in version 8.x

Don't worry, I'm not patronizing you (my readers), I just decided to re-document this for one of our internal users and thought you might want to be able to use it in your own user documentation. WHAT IS THIS DOCUMENT ABOUT? Some people who don't get a lot of mail, like to be notified when such an event occurs. Notification can be; via a sound via a pop-up box via the system tray (where the computer clock is) The pop up box looks like this; Other people, who like myself, get too much mail would rather not be notified. The aim of this document is to tell you how (and where) to turn these options on and off. CHANGING YOUR SETTINGS To change your settings from the Notes 8.x client; On the Menu, click File , then Preferences... On the left hand side , click on the little plus sign to the left of Mail to expand the options. Click on the option marked Sending and Receiving . In the middle section, under receiving, you can control your notifications. If you untick the box mark

How to Create an Auto-Response Mail Message in Lotus Notes 8.5.3+

Why would you do this? Suppose that you have an externally accessible generic email address for your company; support@mycompany.com or info@mycompany.com. You might expose this to the web and allow people to send messages to you. Setting up an auto-response email will tell the senders that their message reached its destination and that it will be dealt with accordingly.  It's also good practice to include links to FAQs or other useful information. Why 8.5.3 The techniques we'll be using here work in older versions of Notes but some of the options seem to have moved around in 8.5.3.  I figured it was a good time to show you where they've moved to. The Procedure Start Domino Designer and open the Mail file to be modified.  A really quick way to do this is to right-click on the application tab and choose "Open in Designer". In the Left hand panel of designer, expand Code and then double-click Agents.  A new window should appear. Click the action

How to Do a Mail Merge to Email using Lotus Notes

Why do one? In today's "green" world, it makes much better sense to send out emails than letters but you still want to personalize them. Sadly, by itself Lotus Notes doesn't support mail merge to email. Of course, we know that outlook does (but then it lets anyone and anything send emails for you - even when you don't want them to). So, how to do it in Notes? OpenNTF The first port of call is OpenNTF ( http://www.openntf.org/ ). This place is full of great things but most of them are really badly documented. Still, these guys give things away for free and they develop in their spare time, so we should be grateful for what we get. There's a great little project there called MailMerge Excel to Notes . Go there, click on releases and download the ZIP file. Getting to the Code The installation is tricky though I've noted that since I asked the author about the install, it's been updated (so maybe these steps are less necessary). Unzip the files to somewher