Cannot Insert Signature for loutscript

I has the following script and try to insert the the signature my designed memo

Dim maildb As New NotesDatabase( "", "" )



Call maildb.OpenMail



Set pfdoc=maildb.GetProfileDocument("CalendarProfile")

’ try also Set pfdoc=maildb.GetProfileDocument(“Calendar Profile”)

Set memo = curdb.CreateDocument()

memo.Form = "Memo"	

Set body = New NotesRichTextItem(memo,"Body")	

strSignature = pfdoc.GetItemValue("$Signature")(0)

Call body.AppendText(strSignature)	



If session.NotesBuildVersion >= 190 Then

	body.Update ' ND6 only

Else

	Call memo.ComputeWithForm(True, False) 

End If







Set newuidoc = ws.EditDocument(True, memo, , , , True)

But the “strSignature” become empty, how can I insert the signature even HTML format to my designed Memo.

Subject: Cannot Insert Signature for loutscript

I believe for a Rich Text field to be updated, you need to save the document first, then open…

I tried this once before and used some script from the CoreEmailClasses Script Library in the Mail Template. In that Script Library, in the Declarations, there is a sub called InsertSignature…

This may help you also…

HTH,

Dan

Subject: RE: Cannot Insert Signature for loutscript

As maildb.getProfileDocument(“CalendarProfile”) return strange document and this is not contain a field “Signature”. Just remind the Memo created is not in mail database.