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

How to check an Outlook mail's *edit mode*?



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 9th 06, 02:59 PM posted to microsoft.public.outlook.program_vba
N More
external usenet poster
 
Posts: 1
Default How to check an Outlook mail's *edit mode*?

Hi!


How to check if the ActiveInspector.CurrentItem is in *edit mode? (it's
only my terminology)

I would like to simply insert a text into the body of the currently
opened mail (by clicking a toolbar button).
But Outlook inserts the text regardless if it's in edit mode or not.
(And even it saves it without a prompt)
I can't find anything how to check this state.

The code is something like this:

30 Set objItem = Application.ActiveInspector.CurrentItem
40 Set objInsp = objItem.GetInspector
50 If objInsp.EditorType = olEditorWord Then
60 Set objDoc = objInsp.WordEditor
70 objDoc.ActiveWindow.Selection.InsertAfter psText
80 Else
90 objItem.HTMLBody = objItem.HTMLBody & psText
100 End If

Thx


*** Sent via Developersdex http://www.developersdex.com ***
 




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
Edit labels in outlook from policy Henning Outlook - Installation 3 May 3rd 06 12:42 AM
Why can't create or edit appointments in Outlook? Steve F Outlook - Calandaring 1 March 8th 06 08:56 PM
Outlook should have a mini-mode, like Media Player's mini-mode. glen Outlook - General Queries 1 February 27th 06 07:16 PM
Outlook cant find Word when trying to edit email. John Outlook - Installation 0 February 6th 06 05:22 AM
Source edit in Outlook 2003 Nees Outlook - General Queries 1 January 18th 06 07:33 PM


All times are GMT +1. The time now is 09:03 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.