View Single Post
  #4  
Old April 8th 08, 04:55 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default 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.

Ads