Solved

Word 2007 Command Button with Protected Document Not Executing

Posted on 2011-02-25
4
894 Views
Last Modified: 2012-05-11
I have created a document in Word 2007 professional that has fields that the user will enter in a a form format.
I have added a command button and some code under a click() action.

If the document is set for "Allow for filling in forms"  under the protection tab and I have NOT pressed the "Yes, Start Enforcing Protection" button  and I press the my form's command button, the click() action code executes.

If I press the "Yes, Start Enforcing Protection" button and click the command button on my form, it depresses, but the click() action subroutine is not executed. If I press it about ten times in a row, the code finally executes.

Take off the protection... and it works on every press.

Any ideas would be helpful.

Thanks,
0
Comment
Question by:JJENSEN3
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:cquinn
ID: 34986701
put a section break either side of the form fields, and when protecting, you can choose to protect just the form section.  Have the button outside the protected section and see if this works
0
 

Author Comment

by:JJENSEN3
ID: 34996923
Where do you choose to protect just the form section?
0
 
LVL 15

Accepted Solution

by:
cquinn earned 500 total points
ID: 35008989
1. Make sure you have the Developer Tab showing - Click on the OFfice icon in the top left corner, then click on the "Word Options" button.  On the "Popular" tab, make sure the "Show Developer" box is checked.

2. Put a section break (continuous or new page) before and after your form elements.

3 On the Developer tab, click the Protect button, then in the protection panel that displays, set the Editing restrictions to "Filling in forms", then click on the "Select sections" link that appears just below.  Check/uncheck for the relevant sections, then click on "Begin Protection", adding a password if required
0
 

Author Comment

by:JJENSEN3
ID: 35009675
Thanks.
That works perfectly.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP/VB email question 4 46
Optimize the query 5 43
How can I keep images from getting compressed? 3 29
how to hit button in form and close application from main() 4 21
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

856 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