What level of security do you need?
Yes, you can use VBA to require a password when Outlook is started. That password needs to either be embedded in the VBA code, or stored in some kind of external file. The ideal situation would be to use a hashed password to avoid storing it in the clear in either place. There is no built-in hash library so that would take some research.
However, this level of security is only good for a compliant user; it is good as a reminder to a user, but not for true security. To defeat this, the user simply has to start Outlook without enabling macros.
(For Outlook VBA, there is really no such thing as a sample file. We prefer to get sample files for Excel or Word questions.)
This code would go in the ThisOutlookSession module. It is just an illustration, and uses the clear password in the code instead of a hashed password in an external location.
Bookmarks