View Single Post
  #5  
Old October 24th 07, 08:46 PM posted to microsoft.public.outlook.program_vba
Jeff
external usenet poster
 
Posts: 41
Default Email signature using Outlook COM object model

You've provided some great ideas on how to work w/ the signature, and
I appreciate them. I'm just trying to focus in on what the Outlook COM
object model alone provides.

For a new email, if setting MailItem.Body erases the signature line of
an email, then one would hope that getting MailItem.Body prior to
setting it would retrieve the signature line of an email.

It'd be nice to be able to do something like this:

pseudocode snippet:

//create a new mail item
MailItem m = folder.Item.Add(OlItemType.olMailItem);

//store off the signature line (if the user has the option on):
String sig = m.Body;

//set Body to be my email content plus whatever the signature line is
m.Body = "my email content" + sig;

Contrary to how I'd like MailItem.Body to work, getting it prior to
setting it returns nothing (even if there is a signature line), and
setting it to something removes the signature line. I see no way to
set the Body of the email to my email content while at the same time
maintaining whatever signature line the user specified to appear in
new emails by default.

Thanks for your patience.

jb


Ads