Enabling macros in ThisOutlookSession / putting them elsewhere

G

Guest

Hi,

I've created a script for use with a rule in Rules Wizard and have put it
into a module in my VbaProject.OTM. The first time that rule runs in each
Outlook invocation, I get a security dialog.

In my Security Panel, on the Trusted Publishers tab, the "Trust access to
Visual Basic Project" is both grayed out and unchecked. (I have security
setting on Medium and have the "Trust all installed add-ins and templates"
box checked.

1) is there a way to enable the "Trust access to Visual Basic Project"
checkbox?

2) would enabling that checkbox prevent the security dialog from showing up
the first time the rule runs?

3) does manually allowing the script to run the first time give rise to a
security risk for the rest of each Outlook session?

4) would enabling the "Trust access to Visual Basic Project" checkbox pose a
security risk, and if so is it different from that in question (3)?

5) is there a way to package my script into an add-in that can be loaded so
I can avoid all these issues and have it trusted by virtue of the setting of
the "Trust all installed add-ins and templates" checkbox?

Tx in advance
 
S

Sue Mosher [MVP-Outlook]

If your goal is to avoid the VBA startup prompt, the solution is to digitally sign your project. You can use the Selfcert.exe tool that comes with Office to generate a personal code-signing certificate.

Much of your code may be transferable to a COM add-in.
 
G

Guest

Thanks Sue,

Does signing the module still risk the possibility that some rogue code can
come in and modify my ThisOutlookSession, and have it run undetected (as it's
signed, therefore allowed)? How does this differ from clicking the
unclickable "Trust access to Visual Basic Project"?

Any way to create a COM add-in without buying (and learning) a development
environment?

Do you (or anyone else) know the answers to my original questions as well?

Can you (or again, anyone else) uncover the mystery of when code needs to be
run by hand or on startup in order to get rules to be able to correctly call
scripts? I don't have any code running on startup, but my filter runs
automatically from the Rules Wizard with no requirement for other code to be
run first.

Tx & rgds
 
S

Sue Mosher [MVP-Outlook]

Does signing the module still risk the possibility that some rogue code can
come in and modify my ThisOutlookSession, and have it run undetected (as it's
signed, therefore allowed)?

I've never seen any demonstration to indicate this is possible.
How does this differ from clicking the
unclickable "Trust access to Visual Basic Project"?

That option isn't really relevant to Outlook.
Any way to create a COM add-in without buying (and learning) a development
environment?

No.
Do you (or anyone else) know the answers to my original questions as well?

I'll try to answer, even though they're not all relevant to your goal.
Can you (or again, anyone else) uncover the mystery of when code needs to be
run by hand or on startup in order to get rules to be able to correctly call
scripts? I don't have any code running on startup, but my filter runs
automatically from the Rules Wizard with no requirement for other code to be
run first.

There is no documentation on this issue. I would put some minimal code statement in the Application_Startup event handler to make sure VBA is invoked when Outlook starts.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


No.


No.

Not that has ever been demonstrated to me.

yes, see http://www.outlookcode.com/d/comaddins.htm
 
G

Guest

Many thanks.

Sue Mosher said:
I've never seen any demonstration to indicate this is possible.


That option isn't really relevant to Outlook.


I'll try to answer, even though they're not all relevant to your goal.


There is no documentation on this issue. I would put some minimal code statement in the Application_Startup event handler to make sure VBA is invoked when Outlook starts.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Not that has ever been demonstrated to me.


yes, see http://www.outlookcode.com/d/comaddins.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top