Solved

How can I add a new custom button only when user opens mail for read purpose?

Posted on 2008-10-14
3
277 Views
Last Modified: 2013-11-08
I have created Outlook add-in using VS .Net 3.5.

In this Add-In I want to add a new custom button only when user opens mail for read purpose. It means when user tries to create New mail or performs any operations like Reply, Reply to all or Forward then I dont want to show this button.

I think I get this done if I check Inspectors EditorType property.

But in case of Outlook  2007 if we double click on any mail in inbox it opens new Inspector and its EditorType is olEditorWord which is same as Inspectors EditorType for New/Reply/ Reply to all/Forward

So how do I know distinguish mail is open for which purpose.  
0
Comment
Question by:aplusexpert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 125 total points
ID: 22749010
Hi, aplusexpert.

I don't see how checking the Inspector's EditorType property is going to be of any use.  EditorType tells us what editor (i.e. HTML, RTF, plain-text) Outlook is using.  If I open an HTML formatted message EditorType is going to be olEditorHTML without regard to whether I'm reading or editing.  Try this code snippet: http://www.outlookcode.com/codedetail.aspx?id=32

You'll need to modify the function declaration a bit.  Something like this

    Function ShowsComposeLayout(Item As Outlook.MailItem) As Boolean

Pass it an Inspector's CurrentItem and I think you'll be in business.
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Office 365 distribution group owner add members instruction in Outlook and OWA. 3 34
Outlook - Windows to Mac 7 38
c#, case, if 4 18
Auto BCC 8 19
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question