Building an e-mail with a signature

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

Does anyone know of a decent way around that?

Subject: Building an e-mail with a signature

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.

Hope that helps!

Subject: RE: Building an e-mail with a signature

Interesting idea. I’ll play around with it. How would adding the signature back in work if they’re using an HTML file?

Subject: RE: Building an e-mail with a signature

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