A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Programmatic text editing



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 7th 08, 05:57 PM posted to microsoft.public.outlook.program_vba
TedMi
external usenet poster
 
Posts: 21
Default 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
  #2  
Old April 7th 08, 06:30 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default 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

  #3  
Old April 8th 08, 02:58 PM posted to microsoft.public.outlook.program_vba
TedMi
external usenet poster
 
Posts: 21
Default 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

  #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.

  #5  
Old April 8th 08, 07:37 PM posted to microsoft.public.outlook.program_vba
TedMi
external usenet poster
 
Posts: 21
Default Programmatic text editing

That's exactly what I'm lookig for! Thanks much.
--
TedMi

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmatic plain-text insert BrianWren Outlook and VBA 2 February 12th 08 04:47 PM
When editing text letters disappear Robert Thompson Outlook Express 10 January 20th 07 12:22 AM
Programmatic Fax Problem Yanir Outlook - Fax Functions 4 December 16th 06 05:11 PM
Text Editing BobW Outlook Express 3 August 6th 06 06:00 AM
how to stop my name apearing in text when editing forward emails Judge_julz Outlook - General Queries 3 June 27th 06 12:04 PM


All times are GMT +1. The time now is 08:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.