We have an application that is trying to build an e-mail to display in the UI. It’s building the body on the back end, and then doing a .EditDocument to open it in the UI. The problem is, whatever is being put into the body field is showing up after the user’s signature. I could just open the document in the UI first and insert my text, except that part of what we need is a doc link and I’d have to find a way to get it onto the clipboard to past it into the UI RT item (unless there’s another way to do that I’m not aware of).
There may be a better approach, but here is one I have used. I temporarily disable to signature in the user’s mail file with this code (which I think I got from somewhere in this forum):
'Disable signature in users mail profile
Set docProfile = maildb.GetProfileDocument("CalendarProfile")
strProfileEnableSignature = docProfile.EnableSignature(0)
If strProfileEnableSignature = "1" Then
docProfile.EnableSignature = ""
Call docProfile.Save(True,False)
End If
'Show memo to UI/front end
Set UIDoc = wks.EditDocument( True, senddoc,,,True, True )
'Re-enable signature in users mail profile
If strProfileEnableSignature = "1" Then
docProfile.EnableSignature = "1"
Call docProfile.Save(True,False)
End If
If you wanted to add the signature after (not needed in my situation), you could pull it out of the calendar profile.
I don’t have any code for adding the signature (html or otherwise). I’d start by hunting around the forum and/or examining the code in the mail template