Solved

How to protect a word form template to hide VBA

Posted on 2008-10-22
5
554 Views
Last Modified: 2010-05-18
Hi,

I have a word template which has user controls in it. My requirement is:
1)I wish to protect this for users from editing it. I am trying to protect it by setting a password to modify. But when I open it in read only, still, I see a lock symbol in the forms control  in the toolbox, by clicking which I am able to unprotect the from. How can I protect it?

2) Secondly, how can I hide my VBA code from users seeing it by ctl+F11 ?

Thanks!
0
Comment
Question by:vdhavala
  • 3
  • 2
5 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 22781355
If you protect the document from the menu and task pane, you will be invited to enter a password when you start enforcement.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 22781384
You can prevent users from viewing the code by a separate protection procedure.
In the VBA editor, choose Tools, then Project properties... You can lock the project and add a password via the Protection tab.
0
 

Author Comment

by:vdhavala
ID: 22782923
The second one is clear. i.e., to hide the code

But I am not very clear with your first suggestion - If you protect the document from the menu and task pane, you will be invited to enter a password when you start enforcement.

Please could you elaborate and let me know how to do this?

Thanks !
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 300 total points
ID: 22783823
Choose Protect Document... from the Tools menu.

Tick the Check Box under Editing Restrictions in the Task Pane that appears.

Choose Filling in Forms from the dropdown.

Click on the 'Yes, Start Enforcing Protection' box.

Enter the new password in the two boxes on the dialogue that appears. Click OK.

0
 

Author Closing Comment

by:vdhavala
ID: 31508956
Thanks! It worked.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Outlook Free & Paid Tools
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now