Google Answers Logo
View Question
 
Q: Need help reading some Outlook code ( No Answer,   1 Comment )
Question  
Subject: Need help reading some Outlook code
Category: Computers > Software
Asked by: sherpaj-ga
List Price: $40.00
Posted: 23 Feb 2005 17:05 PST
Expires: 25 Mar 2005 17:05 PST
Question ID: 479703
I would like to prevent Outlook from blowing away my carefully crafted
views, every time I accidentally click on the column headers in any of
the views. I searched the internet for some code to take care of that
and found the following:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaol11/html/olproLockUserChanges_HV03081803.asp

However, it doesn't seem to work. Since I don't know anything about
VBA, here are my questions:

- Does this code actually do what I want it to do or am I
misunderstanding something?
- What am I doing wrong? Do I need to modify this in any way?
Answer  
There is no answer at this time.

Comments  
Subject: Re: Need help reading some Outlook code
From: manuka-ga on 27 Feb 2005 22:58 PST
 
Hi sherpaj,

This looks pretty good, but I would modify this line:

   If objView.SaveOption = olViewSaveOptionThisFolderEveryone Then

Change it to this:

   If objView.SaveOption = olViewSaveOptionThisFolderEveryone Or _
      objView.SaveOption = olViewSaveOptionThisFolderOnlyMe Then

This will apply the lock to folders that are only accessible to you
as well as folders that are open to others.

Also, note that this won't stop you from clicking on a column 
heading and changing the view settings. However, the changes 
won't be saved. I don't know whether this means your views will 
be restored if you go to a different folder and then back, or 
whether you'll have to quit and restart Outlook. But at least 
you should be able to get them back with a bit less effort than
re-creating them from scratch.

Note: I haven't tried this code, so I can't guarantee anything.
Of course, neither do Microsoft. 8-)

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy