Disable or remove macros

R

Ronny

Is it possible to remove or deactivate the VBA code, so that the user doesn’t
get a question about enabling macros when he opens a document? This must also
be done by use of VBA.
It is not an option to always allow macros.

Ronny
 
D

Doug Robbins - Word MVP

It is certainly possible to remove the code. But tell us how the documents
are being created (and why there is code in them in the first place)

On the other hand, if you set the macro security to high, the macros will be
disabled without the user being asked the question. That setting does
however have to be done for each machine.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
R

Ronny

I have a template document containing the VBA code.
The document is updated with information from excel, and after that unused
chapters are deleted and links to excel is removed. And after this point I
would like to have a document without a macro, or at least without questions
about enabling macros. Could you show me an example off how to do this with
VBA? (The code must be removed or disabled automatically (by use of VBA))
 
S

SmartbizAustralia

Sounds like you need an addin that opens the template and populates
it.
Then there is no macro code in the template.
Alternatively, you have a button in excel that opens the template and
populates it.

It's just a matter of separating the code.

Just a simple job for a vba programmer.


Regards,
Tom Bizannes
Office Development
Sydney, Australia
http://www.macroview.com.au
 
D

Doug Robbins - Word MVP

You should be using File>New and then select the template as the basis for
the document that you want to create.

When you do that, the vba code in the template will be available to that
document, but will not actually be in the document so that there is no code
to be deleted.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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