Solved

How to protect a word form template to hide VBA

Posted on 2008-10-22
5
556 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will show you how to use shortcut menus in the Access run-time environment.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
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…

863 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

25 Experts available now in Live!

Get 1:1 Help Now