Tip

HTML signature maker

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.