Solved

Outlook Emails Opening As Editable

Posted on 2009-07-02
6
201 Views
Last Modified: 2012-05-07
I'd like a small piece of code which works with Outlook 03 and 07 which will ensure that when I open an email in any folder of my Outlook client (pst) the email open in the usual way but is editable. This should work both for plain text and HTML emails. I'd like to be able to toggle the code off. Can anyone help with this?
0
Comment
Question by:Mike235
[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
  • 2
6 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 24780465
Hi, Mike.

The code below will open the currently selected item for editing.  It should work in both 2003 and 2007, but I've only tested it using 2007.
Sub OpenForEditing()
    Dim olkMessage As Outlook.MailItem, _
        ofcCB As Object, _
        ofcCBB As Object, _
        olkInsp As Outlook.Inspector
    Set olkMessage = Application.ActiveExplorer.Selection(1)
    olkMessage.Display
    Set olkInsp = Application.ActiveInspector
    Set ofcCB = olkInsp.CommandBars("Edit")
    Set ofcCBB = ofcCB.Controls("Edit Message")
    ofcCBB.Execute
    Set ofcCBB = Nothing
    Set ofcCB = Nothing
    Set olkMessage = Nothing
End Sub

Open in new window

0
 

Author Comment

by:Mike235
ID: 24830257
Hi again! This is almost what I need and probably fine. I perhaps wasn't sufficiently clear but what I had hoped for is the following : normal behaviour is that when the 'currently selected item' is highlighted as "Enter" is pressed, then that message item opens read-only. I was hoping for it to open read-write on "Enter". Cheers, Mike
0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 24830428
Sorry, I don't see any way to do that.  This works by simulating mouse clicks on toolbar selections.  That requires the item to be visible onscreen.  The events that are triggered when an item opens all occur before the item appears onscreen.  The best solution I can offer is to create a toolbar button that runs this code.  You'd click it instead of pressing Enter.
0
 

Author Closing Comment

by:Mike235
ID: 31599151
OK, good enough, and a conclusive answer. Thanks again for the code. Best regards, Mike
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24831299
You're welcome, Mike.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

615 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