Memo Footer Signature - Using Personal Name.Nsf

By putting the following function in the script library and call it in the
Postopen event of Memo, Reply and Reply with History forms, it will display the
footer signature when a memo is compose or reply. Users to easily change their
footer signature under the Comment field in their person document in the
personal address book.
Function AddSignature
Dim Workspace As New NotesUIWorkspace
Dim Session As New NotesSession
Dim dbNames As New NotesDatabase("","names.nsf")
Dim CurrUserName As New NotesName(Session.UserName)

Dim UIdocMail As NotesUIDocument
Dim viewPeople As NotesView
Dim docMail As NotesDocument
Dim docPeople As NotesDocument

Set UIdocMail = Workspace.CurrentDocument
Set docMail = UIdocMail.Document

If Not (UIdocMail.IsNewDoc) Or (UIdocMail.EditMode = False) Or
(docMail.From(0) <> CurrUserName.Canonical) Then
Exit Function
End If
Dim SignMsg As String
kfound% = 0
Set viewPeople = dbNames.GetView("($VIMPeople)")
Set docPeople = viewPeople.GetDocumentByKey(CurrUserName.Abbreviated)
While Not (docPeople Is Nothing)

Dim rtitem As Notesrichtextitem
On Error Resume Next
Set rtitem = docPeople.GetFirstItem( "Comment" )
If rtitem Is Nothing Then Exit Function
If ( rtitem.Type = RICHTEXT ) Then
signMsg = rtitem.GetFormattedText( False, 0 )
End If

Dim checkform As String
If UIdocMail.FieldGetText("SendTo") = "" Then
checkform = "new"
Else
checkform = "old"
End If

Call UIdocMail.GotoField("Body")
Call UIdocMail.InsertText(Chr(10) + SignMsg )

If checkform = "new" Then
Call UIdocMail.gotoField("SendTo")
Else
Call UIdocMail.gotoField("Body")
End If

kfound% = 1
Set docPeople = Nothing
Wend
End Function

Dig Deeper on Domino Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-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 ...

SearchDataCenter

SearchContentManagement

Close