Custom e-mail and generating auto signature

Hi.I have a following problem. My application let user create an e-mail from template and send it to anyone from application’s addressbook. Template is document with a body field with some predefined formated text, graphics or attachments.

What I need is to append user’s mail signature, that the user uses in his own mail database. I need to grab that signature somehow from his mail database no matter if it is ascii or html signature.

I tried to open mail database, create a new memo in backend, open it to frontend, then close it and insert custom content and finally open it again. I tried many possibilities. But it’s tricky. Doesn’t work. E.g.:

Dim Ws as New NotesUIWorkspace

Dim mDb As New NotesDatabase(“”, “”)

Dim nDoc As NotesDocument

Dim uiDoc As NotesUIDocument

Dim RT As NotesRichTextItem

Dim Doc As NotesDocument

Call mDb.OpenMail

Call Ws.OpenDatabase(mDb.Server, mDb.FilePath, “($Inbox)”)

Set nDoc = mDb.CreateDocument

nDoc.Form = “Memo”

Set RT = New NotesRichTextItem(nDoc, “Body”)

Set uiDoc = Ws.EditDocument(True, nDoc)

Set Doc = uiDoc.Document

Call uiDoc.Save

Call uiDoc.Close

Set RT = Doc.GetFirstItem(“Body”)

If RT Is Nothing Then

MsgBox “NoNo”

End If

Call RT.AppendText(“TEST”)

Set uiDoc = Ws.EditDocument(True, nDoc)

Does anybody know, how to solve this problem?

Thanks in advance. Jiri

Subject: Custom e-mail and generating auto signature

in LS use the ComposeDocument method of NotesUIWorkspace class. In formula lang. use the Compose function.

Subject: Custom e-mail and generating auto signature

If you search the forum there should be posts on the location of the signiture in a mail db. I think the signature is on a profile document called “(Calendar Profile)” but I could be wrong.

You can then insert the signature from your application rather than opening it up in the person’s mail db.