Adding password to a macro module

A

Aerojade

Hi. I want to add macro protection to a MS Word file using a macro function.
The function takes a string as an argument and then adds protection to the
current VBEProject. How can i do this. For clear understanding, here is what
i need accomplished :

Add a macro protection password to the current VBEProject using a function
contained within the same project.
 
D

Doug Robbins - Word MVP

I believe that the only way to protect the code in a template from being
viewed is to apply the protection manually.

I could be wrong, but why isn't that an option for you?

--
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, originally posted via msnews.microsoft.com
 
A

Aerojade

Doug Robbins - Word MVP said:
I believe that the only way to protect the code in a template from being
viewed is to apply the protection manually.

I could be wrong, but why isn't that an option for you?

--
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, originally posted via msnews.microsoft.com



Well, i basically have a module within an MS Word document, the codes of
which i need to prevent access to. In order to do this, i am running a random
string generator and want to use the returned string as the password for the
module.
 
D

Doug Robbins - Word MVP

Copy and paste the random string into the password controls of the
Protection tab of the template Properties dialog.

--
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, originally posted via msnews.microsoft.com
 

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