View Single Post
  #1  
Old November 9th 06, 10:25 AM posted to microsoft.public.outlook.program_addins
Peter Reinhold
external usenet poster
 
Posts: 7
Default Creating a new mailItem with a signature, and a modified HTMLBody

Hi All,

I am coding a OL2003 addin in C# using VS2005 and VSTO, and have my
core functionality working (a toolbar with a button, from which you are
able to create a new mailitem)

My problem is, I want to modify the HTMLBody of this new mailItem,
which I can, but this removes the signature.

If I try and use the HTMLBody from the created mail (after its been
shown, so it contains the signature), I get a security warning, which
is not acceptable for my end-users.

I've tried using Redemption, with the following code :

--
Outlook.MailItem newMail =
Outlook.MailItem)outlookApp.CreateItem(Outlook.OlI temType.olMailItem);
Redemption.SafeMailItem safeMail = new Redemption.SafeMailItem();

safeMail.Item = newMail;

newMail.HTMLBody = safeMail.HTMLBody.Replace("BODY", mailBody)
--

But, the safeMail.HTMLBody is just empty, it does not contain the
HTMLBody of the original mailItem.

Does anyone know either how to get the current users signature so I can
append it to my HTML mail, or, how to get Redemption to properly return
the HTMLBody of the original mailItem?


Kind Regards,
Peter

Ads