?
Solved

How to protect a word form template to hide VBA

Posted on 2008-10-22
5
Medium Priority
?
566 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1200 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
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…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

801 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