![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Can someone confirm that the Outlook 2003 COM object model does not
provide a way to programmatically get, modify, or remove the signature line of an email? Furthermore, it doesn't look like Redemption RDO supports manipulating the signature line either (http://www.google.com/search?q=signature +site%3Ahttp%3A%2F%2Fwww.dimastr.com%2Fredemption %2F&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en- US ![]() I've noticed that a SafeMailItem will contain the signature line as long as I don't modify the Body property. Has anyone else noticed that? Thanks, Jeff |
#2
|
|||
|
|||
![]()
It certainly is possible to add a signature to an email message. If Word is the editor, it's also easy to remove it, because it's exposed as a Bookmark object. See http://www.outlookcode.com/codedetail.aspx?id=615. If Word is not the email editor, the signature is not distinguished in any way from the rest of the text.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Jeff" wrote in message oups.com... Can someone confirm that the Outlook 2003 COM object model does not provide a way to programmatically get, modify, or remove the signature line of an email? Furthermore, it doesn't look like Redemption RDO supports manipulating the signature line either (http://www.google.com/search?q=signature +site%3Ahttp%3A%2F%2Fwww.dimastr.com%2Fredemption %2F&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en- US ![]() I've noticed that a SafeMailItem will contain the signature line as long as I don't modify the Body property. Has anyone else noticed that? Thanks, Jeff |
#3
|
|||
|
|||
![]()
Thanks for the link.
I did not see the text of the signature in the value of the Body property of Redemption's SafeMailItem, as one might expect. Based on that test, also I assume that the signature would not appear in RDO.RDOMail.Body, .HTMLBody, .RTFBody either, but I didn't take the time to test those. I didn't see a ".Signature" property or equivalent in Outlook COM, Redemption Safe* items, or Redemption RDO objects. Am I missing something? In my install of Outlook 2003 (Word as Editor, HTML format by default) the signature line is getting added as long as I don't manipulate the SafeMailItem.Body property. Is that expected? Thanks, Jeff |
#4
|
|||
|
|||
![]()
There is no Signature property. The operations I describe do not depend on there being one.
It might help if you showed some code. Without that, we have no way of knowing in what order you're performing operations, etc. If you overwrite the Body property, for example, any signature that already exists is going to be replaced by your new Body text. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Jeff" wrote in message ups.com... Thanks for the link. I did not see the text of the signature in the value of the Body property of Redemption's SafeMailItem, as one might expect. Based on that test, also I assume that the signature would not appear in RDO.RDOMail.Body, .HTMLBody, .RTFBody either, but I didn't take the time to test those. I didn't see a ".Signature" property or equivalent in Outlook COM, Redemption Safe* items, or Redemption RDO objects. Am I missing something? In my install of Outlook 2003 (Word as Editor, HTML format by default) the signature line is getting added as long as I don't manipulate the SafeMailItem.Body property. Is that expected? "Sue Mosher [MVP-Outlook]" wrote in message ... It certainly is possible to add a signature to an email message. If Word is the editor, it's also easy to remove it, because it's exposed as a Bookmark object. See http://www.outlookcode.com/codedetail.aspx?id=615. If Word is not the email editor, the signature is not distinguished in any way from the rest of the text. "Jeff" wrote in message oups.com... Can someone confirm that the Outlook 2003 COM object model does not provide a way to programmatically get, modify, or remove the signature line of an email? Furthermore, it doesn't look like Redemption RDO supports manipulating the signature line either (http://www.google.com/search?q=signature +site%3Ahttp%3A%2F%2Fwww.dimastr.com%2Fredemption %2F&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en- US ![]() I've noticed that a SafeMailItem will contain the signature line as long as I don't modify the Body property. Has anyone else noticed that? |
#5
|
|||
|
|||
![]()
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 |
#6
|
|||
|
|||
![]()
one would hope that getting MailItem.Body prior to
setting it would retrieve the signature line of an email. It does, if (a) the user has an automatic signature set up and (b) you call MailItem.Display first. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Jeff" wrote in message ups.com... 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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why does the Address property of the Recipient object in the Outlook object model look funny? | Omatase | Outlook - General Queries | 2 | July 13th 07 09:09 PM |
Outlook Object Model Threading | MON205 | Outlook - General Queries | 8 | May 6th 07 04:37 PM |
Outlook Object Model Threading | MON205 | Add-ins for Outlook | 8 | May 6th 07 04:37 PM |
Outlook object model guard | Mark Priem | Outlook and VBA | 7 | January 3rd 07 06:41 PM |
How to redistribute Outlook Object Model? | papachina | Outlook and VBA | 5 | September 11th 06 07:14 PM |