@tomasm
I covered most of the above points in my reply to your email that I sent on Sunday morning. As it seems you haven't seen that, I'll repeat some of the comments below:
I don't see the "enable content" banner but I do get the "security risk - microsoft has blocked macros..." banner and the autoexec macro is prevented from running. (I get this banner in the unlocked version as well.)
The unlocked version has no security & is designed to show all standard Access messages.
I would have expected the locked version should open with no security messages even from a untrusted location. You also don't need to unblock it after downloading to remove the 'mark of the web'.
However, your comments about the autoexec macro are wrong . The trust center statements are misleading. Certain 'safe code' such as message boxes (etc) will run from an autoexec macro even if a file is untrusted. In fact, it runs BEFORE the security banner appears. For more details, see my article
This article debunks several widely believed fallacies about the autoexec macro used at startup
www.isladogs.co.uk
However, autoexec macro code deemed unsafe is blocked until the file is trusted.
I read through the article again and I don't see that the trusted file/location topic is explicitly addressed. Are you preventing the "enable content" ribbon by signing with a commercial security certificate?
Yes. I used a commercial code signing certificate in the locked version. I mentioned this in the Downloads section of my article (item 12) as stated below
The VBA project in the above file has been digitally signed with a code signing certificate.
This means the file is trusted. You will not need to unblock the file to remove the 'mark of the web'
Signing a project offers several advantages:
- the file is automatically trusted so the MOTW doesn't get applied
- for the same reason, the security banner doesn't appear even in an untrusted location
- the code is protected from changes.
For full details, see my article
This article explains how to use the new VBA project signing feature in Access. It also compares the use of this feature with using trusted locations when distributing your Access applications
www.isladogs.co.uk
The isladogs ribbon xml provided on the security web article works as well. Clicking File causes a UI Runtime error but this doesn't appear to affect anything.
As you say, the UI error doesn't affect functionality but I'll investigate this.
Ticking the client setting Show Add-In User Interface Errors is useful for diagnosis purposes but offers no benefit to the end user. I recommend leaving it unticked except when testing ribbon code