Authorize one document's AutoOpen macro?

E

Ed

I have a document (Word 2000) with an AutoOpen macro. The idea is to set my
Task Scheduler to open this document after work hours and have the macro run
some stuff during the night. The problem is the macro warning. I
understand that I would have to set security low to stop this, and I know
that's not necessarily a good idea. I also understand that you can't use
VBA code to enable macros.

But is there any way to set some kind of authorization on this one document
or macro that will not trigger the warning? Is there a setting within the
VBA modules that "if you see this, this macro is okay?" Otherwise, the
document opens, and I come in to work the next morning to a macro warning on
my screen!

Ed
 
M

Mark Tangard

Hi Ed,

Make a digital certificate using SelfCert.exe, which is installed
with Office (usually) (if it isn't, you can still get it from the
CD although I don't remember exactly how). Then in the project
your macro is in, in the VBE, click Tools-> Digital Signature,
and choose the certificate you made. Now run the macro and
'trust' the cerrtificate. (Am reciting this from memory, may
have left out a step or two, but it'll be obvious once you get
rolling.)
 
E

Ed

Thank you, Mark. I appreciate the answer.

Ed


Mark Tangard said:
Hi Ed,

Make a digital certificate using SelfCert.exe, which is installed
with Office (usually) (if it isn't, you can still get it from the
CD although I don't remember exactly how). Then in the project
your macro is in, in the VBE, click Tools-> Digital Signature,
and choose the certificate you made. Now run the macro and
'trust' the cerrtificate. (Am reciting this from memory, may
have left out a step or two, but it'll be obvious once you get
rolling.)

--
Mark Tangard, Microsoft Word MVP
Please reply only to the newsgroup, not by private email.
Note well: MVPs do not work for Microsoft.
"Life is nothing if you're not obsessed." --John Waters
 

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