Reliable Answers - News and Commentary

How to toggle in-cell editing (or other views) in Microsoft Outlook

Microsoft Outlook 2003 is a very capable email application with programmatic access to many of its features. The one thing it does lack is simplicity in exposing the volume of libraries and objects available, especially when your objective is something that would otherwise be simple enough to achieve either with the Menus or manually within the system. This article details an example of toggling alternating views to enable and disable in-cell editing within the messages listing.

The easy way would be to add a new "view" that has the options you want to apply and then write a macro that alternates setting THIS VIEW. To do this, follow the instructions below.


In the menus, select...

View - Arrange By - Current View - Define Views...


Next, open the code editor (ALT+F11) and add the following procedure:

Sub ToggleInCellEditing()
' validation
  If Outlook.ActiveExplorer Is Nothing Then Exit Sub

' variables
  Dim exp As Explorer

' get handle to selection
  Set exp = Outlook.ActiveExplorer

' toggle the view
  If exp.CurrentView = "Messages" Then
    exp.CurrentView = "Messages+Cells" '<-- MUST BE VALID!
    exp.CurrentView = "Messages"
  End If

' clean up
  Set exp = Nothing
End Sub

Then, with the inbox selected (so it propagates to the other folders) add a button to the toolbar to run the macro, changing the view of the button to whatever you like.

Clicking the button will now toggle the views between the Messages and Messages+Cells views.


Shawn K. Hall

About the Author:

Shawn K. Hall is a homeschool dad and a security consultant providing solutions for local businesses in the Tuolumne County, CA area. He owns and operates 12 Point Design, a professional web development company, providing hosting and security solutions in addition to website creations and maintenance. In his "spare time" Mr. Hall is also very active in many online forums where he freely gives of his time and talents to assist struggling web developers.

Carschooling by Diane Flynn Keith

Take me to the top

We invite you
to visit:

Professional Web Hosting and Design Services: 12 Point Design Local Homeschool provides the most up-to-date support group listings in a geographical and searchable index Budget Homeschool Kidjacked -- To seize control of a child, by use of force SaferPC dispels security misunderstandings and provides you with a solid understanding of viruses and computer security Reliable Answers - developer information, current news, human interest and legislative news Twain Harte Times - Twain Harte, CA - The closest you can get to Heaven on Earth Cranial Laser & Neurolymphatic Release Techniques (CLNRT) - Experience dramatic pain reduction At Summit Chiropractic our mission is to improve your quality of life - We know that health is much more than just not feeling pain Visit to learn about your preschool options.