Adding a macro to a Word form
I have created a form in Word 2007 and added a macro.
The form includes general instructions text (including the shortcut keys to run the macro that will delete the instruction text when the user has finished filling out the form), but when I add protection
to the form and press the shortcut keys I get an error run message. Is there any way around this or another way to be able to delete the instruction text when the user completes the form?
Solutions to the Problem Adding a macro to a Word form
Download SmartPCFixer for Free Now
Plain text can't be deleted (or added or modified or formatted...) while the document is
protected.
The way to do this is in three steps within the macro:
1.
Unprotect the document
2.
Make the change(s)
3.
Reprotect the document
In code,
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect ' , Password:="MyPassword"
End If
' make the change(s) here
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
Jay Freedman
MS Word MVP FAQ: http://word.mvps.org
Make Sure that your Computer Meets the System Requirements
Microsoft Windows Requirements :
- 1 gigahertz (GHz) or faster 32-bit (x86) or 64-bit (x64) processor
- 1 gigabyte (GB) RAM (32-bit) or 2 GB RAM (64-bit)
- 16 GB available hard disk space (32-bit) or 20 GB (64-bit)
This error can be due to some configuration requirements for you system. If your computer hardware is not up to par, then make sure you update where necessary before continuing.
Another Safe way to Fix the Problem: Adding a macro to a Word form:
How to Fix Adding a macro to a Word form with SmartPCFixer?
1. Click the button to download SmartPCFixer . Install it on your system. Run it, and it will scan your computer. The errors will be shown in the scan result.
2. After the scan is finished, you can see the errors and problems need to be fixed. Click Fix All.
3. When the Fixing part is finished, your computer has been speeded up and the errors have been fixed
Related: How to Fix - 64g ssd with a 500g regular drive?,Allow Unhide Rows in Protected Workbook [Solved],[Solved] Get in Excel 2007 data from Access 2007 out of self-built Queries,[Solution] How can I temporarily disable 'service manager' to install Adobe flashplayer?,[Anwsered] When I try to watch a flash video, I am told occasionally that I don't have Adobe Flash.,Solution to Error: Black screen during boot sequence,[Solved] Can't restore Windows 7 64-bit from external hard drive,How to Fix - IE 11 Enhance Protect Mode reset issue with add-on's?,Solution to Error: Internet Explorer 9 update/install error - Error Code 80092004,Upgrading to IE 8 causes cookies to get deleted when starting IE [Anwsered],Solution to Problem: All programs try to start from windows component
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,How to Fix Error - Getting an error "not connected to the internet" while trying to install Samsung Kies?
,How to Fix - Internet Explorer shuts down and reopens tab when attaching to email or uploading files.?
,Fast Solution to Problem: Sending Error Message
,[Anwsered] Thinkpad 8611 Boot,How to Resolve - Svchost Helper?,Fast Solution to Problem: L30 101 Driver Windows 7,Troubleshooter of Error: Io Device,How to Fix Error - Dell Laptop Code 39?
Read More: Adding text in a cell from a check box or list [Anwsered],How to Fix Error - Address fields mismatched after installing KB829918?,How Can I Fix - Address bar drop down menu has stopped dropping down, how do I fix this problem??,How to Fix - After every start on Windows 7, there appears on the desktop an annoying input string.?,[Anwsered] After I upgraded to Windows 7 I lost the ability to drag and drop between specific programs,a file called mDNSResponse.exe. is causing bonjour not to operate properly,what should I do?,A QUESTION USING THE "IF'S" Formula.,A continuos flashing window with which title is C:Windows\System32\cmd.exe, and has the following message: The syntax of the command is incorrect.,Acrobat compatibility issue and you tube problems____,ActiveX on IE 9 not loaded
没有评论:
发表评论
注意:只有此博客的成员才能发布评论。