Skip to content

Lock Outlook Views, preventing any accidental changes from being saved when you close the Explorer.

License

Notifications You must be signed in to change notification settings

Hornblower409/Outlook-ViewLock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ribbon Custom Group

Outlook-ViewLock

Lock Outlook Views, preventing any accidental changes from being saved when you close the Explorer.

Purpose

To compensate for the lack of a "Save Changes?" step after modifying the Settings of an Outlook View.

ViewLock can lock a View, preventing any accidental changes from being saved when you close the Explorer, and allows you to Edit a View with the option to not save your changes.

When you make changes to an Outlook View there is no way to cancel or undo them. If you accidentally click on a column heading it permanently changes the Sort order for that View. If you have modified any of the Advanced View Settings (Columns, Group By, Sort, etc.) and don't like the new design, there's no way to undo your changes once you hit "OK" on the Settings dialog. There are ways to backup and restore a View, but they are manual and tedious.

Install

For help on using the VBA Editor, running Macros, or adding Macros to your Quick Access Toolbar or Ribbon see the Slipstick Systems web site article: How to use Outlook's VBA Editor

Download and unzip the latest Release ZIP file from Releases. Open the Outlook VBA Editor and import two files from where you unzipped the Release:

  • File -> Import: ViewLock.bas
  • File -> Import: ViewLockForm.frm

Then:

  • Debug -> Compile ...
  • File -> Save VbaProject.OTM

Using ViewLock

The Module has five Macros:

  • ViewLock_Lock
  • ViewLock_Unlock
  • ViewLock_State
  • ViewLock_Save
  • ViewLock_Form

The first four operate only on the current View. ViewLock_Form opens a User Form that allows you Lock/Unlock Views in the current Folder, the current Folder and all it's subfolders, the current Store (.pst file) or the entire system.

Step 1 - Lock All Views

Run the "ViewLock_Form" macro. Select the "System" Scope, "All" Type, check the "What If?" box, and click the "Lock" button. If everything runs OK, then uncheck the "What If?" box and click "Lock" again. This locks all the Views on your system.

Now, if you inadvertently make changes to a locked View, just close any Explorers using that View. When you reopen the View, it will have reverted to the unmodified version.

Step 2 - Making Changes

When you need to edit a Locked View, there are two methods:

Lock, Edit, Save - Make sure the View is locked and leave it locked, make your changes, and then run Save. The disadvantage of this method is that if you close the Explorer without running Save your changes are lost.

Unlock, Edit, Save - Unlock the View, make your changes, and Save or Lock it. The disadvantage of this method is that you can't discard any changes because your changes become permanent when you close the Explorer.

Side Effects on Open Views

Changing the state of an open View may sometimes hoark up it's appearance. Don't Panic. Just close and reopen the Explorer or switch to a different View and back again.

Lock Pickers

I have found the following situations where the Locked state of a View is ignored. I'm sure there are more.

Standard Views - If you have modified and Locked any of the Outlook Standard Views (e.g. Compact, Single, Preview) then doing a "Reset" in the Advanced View Settings dialog ignores any locks.

Shared Views - These are Views that have "All Xxxx folders" in the "Can Be Used On" column of the Manage All Views dialog. (e.g. "All Mail and Post folders"). There is really only one copy of these Views on your system, even though they appear in multiple Folders. Making a change to the Locked state on any one of them changes all occurrences of that View for that Folder type system wide.

Legal

Copyright (C) 2024, 2025 Lycon Of Texas

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Screen Shots

Store Scope Form System Scope - Show And Tell

About

Lock Outlook Views, preventing any accidental changes from being saved when you close the Explorer.

Topics

Resources

License

Stars

Watchers

Forks

Languages