![]() |
Programmatic text editing
Is it possible to write a macro to edit the text of a received message? If
so, what part of the object model do I need to explore? In the online references to Outlook programming, I find lots of info on handling O.L. items, but not on getting inside an item. Thanks. -- TedMi |
Programmatic text editing
Take a look at the MailItem.Body and HTMLBody properties.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "tedmi" wrote in message ... Is it possible to write a macro to edit the text of a received message? If so, what part of the object model do I need to explore? In the online references to Outlook programming, I find lots of info on handling O.L. items, but not on getting inside an item. Thanks. -- TedMi |
Programmatic text editing
Sue: Thanks for the response, but those are awfully blunt instruments! Is
there no way operate on selected text, to perform find/replace? I expected that with the greatly enhanced Word-like capabilities of 2007's native editor would be exposed in the object model. -- TedMi |
Programmatic text editing
You didn't mention selected text or Outlook 2007 in your initial post. That changes the scenario considerably. Once you return a Word.Document object from the Inspector.WordEditor method in the Outlook object model, you can use Word methods to work with the Word.Selection object and the rest of the message text. See http://turtleflock-ol2007.spaces.liv...E3D8!579.entry for an example.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "tedmi" wrote in message ... Sue: Thanks for the response, but those are awfully blunt instruments! Is there no way operate on selected text, to perform find/replace? I expected that with the greatly enhanced Word-like capabilities of 2007's native editor would be exposed in the object model. -- "Sue Mosher [MVP-Outlook]" wrote in message ... Take a look at the MailItem.Body and HTMLBody properties. "tedmi" wrote in message ... Is it possible to write a macro to edit the text of a received message? If so, what part of the object model do I need to explore? In the online references to Outlook programming, I find lots of info on handling O.L. items, but not on getting inside an item. Thanks. |
Programmatic text editing
That's exactly what I'm lookig for! Thanks much.
-- TedMi |
All times are GMT +1. The time now is 09:20 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com