none
Formatting text in ContactItem.body (Outlook 2003, VBA) RRS feed

  • Question

  • Hello list,

    in a VBA makro I am currently developing I would like to use character formatting (bold and/or italic typefaces, different sizes of text) on the text I add to the ContactItem.body property.

    Anybody got a hint if it is possible to mix in any formatting codes in this attribute?

    Thanks a lot!



    • Edited by ubdv Friday, February 24, 2012 11:30 AM
    Friday, February 24, 2012 11:29 AM

Answers

  • No, you cannot set rich formatting through Body property. Check if WordEditor property on inspector for that item is not null and cast it to Word.Document class and use Word API to provide rich formatting.
    • Marked as answer by ubdv Monday, February 27, 2012 11:26 AM
    Friday, February 24, 2012 12:07 PM

All replies

  • No, you cannot set rich formatting through Body property. Check if WordEditor property on inspector for that item is not null and cast it to Word.Document class and use Word API to provide rich formatting.
    • Marked as answer by ubdv Monday, February 27, 2012 11:26 AM
    Friday, February 24, 2012 12:07 PM
  • You can set the ContactItem.RTFBody property.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!

    Friday, February 24, 2012 2:09 PM
  • on 2003? wasn't it added in 2010?
    Friday, February 24, 2012 2:49 PM
  • Sorry, i did not realize this was for Outlook 2003.

    Yep, Inspector.WordEditor or Redemption (SafeContactItem.RtfBody or RDOContactItem.RtfBody) are the only options.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!

    • Proposed as answer by DamianD Friday, February 24, 2012 3:28 PM
    Friday, February 24, 2012 3:03 PM
  • Thanks very much for your help!
    Monday, February 27, 2012 11:26 AM