Solved

Outlook Emails Opening As Editable

Posted on 2009-07-02
6
197 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
  • 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

832 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