HTML signature maker

This tip is an easy way to create an HTML signature file that shows a graphic and a link to a Web page.

View member feedback to this tip.

Our IT department requested an easy way to create an HTML signature file that shows a graphic and a link to our Web page for a new product. The nsf that was created displays a non-saved form that gets some default information from another form (URL, graphic location and brief text) as well as user information.

On entering the database, the signature displays a frameset in two frames. Once the "Build Htm" button is pressed from the frame on the left, the frame on the right displays the sig2.htm file that was generated by the button.
 

Build Htm file button on form:

Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim Cdoc As NotesDocument
 
Set uidoc = ws.CurrentDocument
 Set Cdoc = uidoc.Document
 
Dim fileNum As Integer, empNumber As Integer, 
I As Integer Dim fileName As String, empName 
As String Dim empLocation As Variant direc = "c:signature" 
 
On Error Resume Next
 
directory$ = Dir( direc, 16 )
If directory$ = "" Then Mkdir(direc)
 
fileNum% = Freefile()
fileName$ = direc & "sig2.htm" 
 
Open fileName$ For Output As fileNum%
 
aline$ = "&ltHTML>"
Print #fileNum%, aline$
 
bline$ = "&ltHEAD>" 
Print #fileNum%, bline$
 
Write #fileNum%, "&ltTITLE></TITLE>"
 
cline$ = "</HEAD>"
Print #fileNum%, cline$
 
dline$ = "&ltBODY LINK='#0000ff' VLINK='#800080'>"
Print #fileNum%, dline$
 
eline$ =  "&ltFONT SIZE=2>" & 
session.commonusername & "&ltbr>"
 Print #fileNum%, eline$
 
fline$ = "&ltb>&lti>" & uidoc.FieldGetText
( "title" ) & "</b></i> - 
&ltA HREF='http://www.phdinc.com
/'>&ltI>&ltFONT FACE='Arial' SIZE=2&gtPHD, Inc.
</I></FONT></A>&ltbr>" 
 Print #fileNum%, fline$
 
If Trim(uidoc.FieldGetText( "email")) <>"" Then
  fline$ = "&ltA HREF='" & uidoc.FieldGetText( "email") 
& "'>" & uidoc.FieldGetText( "email") & "</A>&ltbr>"  
Print #fileNum%, fline$  
End If
 
If Trim(uidoc.FieldGetText( "phone")) <>"" Then
fline$ = "Phone: " & uidoc.FieldGetText( "phone") & "&ltbr>"  
Print #fileNum%, fline$  
End If
 
gline$ =  "&ltFONT FACE='Arial' SIZE=2>
*********************************************&ltBR>
&ltIMG SRC='prodgraph.gif' WIDTH=108
 HEIGHT=36></FONT>&ltB>&ltFONT 
FACE='Arial'>&ltBR></B></FONT>"
Print #fileNum%, gline$
 
gline$ = uidoc.FieldGetText( "htmNote") Print #fileNum%, gline$
 
hline$ = "</FONT>&ltA HREF='" & uidoc.FieldGetText
( "urladd") & "'>" & uidoc.FieldGetText( "urladd") & "</A>&ltbr>"
Print #fileNum%, hline$
 
iline$ =  "</BODY>"
Print #fileNum%, iline$
 
jline$ =  "</HTML>"
Print #fileNum%, jline$
 
Close fileNum%
 
tmpG$ = Trim(uidoc.FieldGetText( "tGraphic")) 
If tmpG$ <> "" Then
 Filecopy tmpG$, "C:signatureprodgraph.gif"
End If

MEMBER FEEDBACK TO THIS TIP

You can do the same thing in Microsoft Word Word. Just format your document and save as 'unfiltered HTML.'

—Linda L.

******************************************

I'm much more interested in knowing how to get the same html-file in both the client AND in Lotus Notes.

—Anders M.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Kevin Park. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

This was first published in June 2005

Dig deeper on HTML for Lotus Notes Domino

1 comment

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close