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$ = "<HTML>" Print #fileNum%, aline$ bline$ = "<HEAD>" Print #fileNum%, bline$ Write #fileNum%, "<TITLE></TITLE>" cline$ = "</HEAD>" Print #fileNum%, cline$ dline$ = "<BODY LINK='#0000ff' VLINK='#800080'>" Print #fileNum%, dline$ eline$ = "<FONT SIZE=2>" & session.commonusername & "<br>" Print #fileNum%, eline$ fline$ = "<b><i>" & uidoc.FieldGetText ( "title" ) & "</b></i> - <A HREF='http://www.phdinc.com /'><I><FONT FACE='Arial' SIZE=2>PHD, Inc. </I></FONT></A><br>" Print #fileNum%, fline$ If Trim(uidoc.FieldGetText( "email")) <>"" Then fline$ = "<A HREF='" & uidoc.FieldGetText( "email") & "'>" & uidoc.FieldGetText( "email") & "</A><br>" Print #fileNum%, fline$ End If If Trim(uidoc.FieldGetText( "phone")) <>"" Then fline$ = "Phone: " & uidoc.FieldGetText( "phone") & "<br>" Print #fileNum%, fline$ End If gline$ = "<FONT FACE='Arial' SIZE=2> *********************************************<BR> <IMG SRC='prodgraph.gif' WIDTH=108 HEIGHT=36></FONT><B><FONT FACE='Arial'><BR></B></FONT>" Print #fileNum%, gline$ gline$ = uidoc.FieldGetText( "htmNote") Print #fileNum%, gline$ hline$ = "</FONT><A HREF='" & uidoc.FieldGetText ( "urladd") & "'>" & uidoc.FieldGetText( "urladd") & "</A><br>" 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
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.