Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Outlook Emails Opening As Editable

Posted on 2009-07-02
6
Medium Priority
?
202 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 2000 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

722 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