#1
|
|||
|
|||
Spellcheck macro for protected form fields needed
I've developed a Word 2010 template that has many legacy text form fields that are protected. I need a macro to run so that it will check the spelling within the protected fields. I have tried several that I found online, but they don't seem to catch all of the mistakes. I've inserted mistakes purposely in order to check the macro. Thanks for any suggestions. |
#2
|
|||
|
|||
"several that I've found online?"
How to enable the spellchecker in a protected document This one works. I am assuming that you are using legacy form fields and not content controls or ActiveX controls and that the document is protected for filling in forms. |
#3
|
|||
|
|||
That is one that I did run, but it wasn't picking up the misspelled words. I misspelled several words on purpose in order to check the accuracy. I didn't know if it might be because it was written for Word 97 and I'm using Word 2010. Yes, I am using the legacy form fields.
|
#4
|
|||
|
|||
Are the misspelled words in the formfields?
In the protected area of the document? In an unprotected section? Is the document protected for filling in forms? When the document is not protected for forms, does the spelling checker work on the errors you have typed? |
#5
|
|||
|
|||
Quote:
(Note, this link to my DropBox will only work for a relatively short time. I'm submitting it to the MVP site for inclusion in their sample zip folder. If the first link produces no results, try the original site.) |
#6
|
|||
|
|||
The misspelled words are in a text form field within a table (I opted not to use a text box). Could that make a difference? I have noticed that it will correct words not in a text form field, but the regular spell check picks those up too. When it is unprotected, the regular spell check does not pick up the mistakes in the form fields either. That's what prompted me to look for a macro. This is my first attempt to use a macro, but I have followed the directions. It may be that I'm not doing everything correctly. I will continue to work on it.
|
#7
|
|||
|
|||
Please download and try the sample .dotm file. Does that work on your system?
"Text box" is a either an ActiveX control or graphical element containing text. You do not want to be using either. "Text form field" is a legacy form field. A Plain Text or Rich Text content control will not work with the macro. |
#8
|
|||
|
|||
I tried the sample .dotm file, and the only words it corrected were the ones outside of the form fields. Could there be a setting on my Word that restricts spelling and grammar checks in the legacy form fields?
|
#9
|
|||
|
|||
The only words that will be marked with the Wavy red underline are misspellings in the unprotected portion.
Try either opening that template or create a document based on it, complete with the example text. Run the SpellCheck macro. You can do this using the F7 key or using the check icon on the QAT. |
#10
|
|||
|
|||
This worked great for what I was trying to do. How did you get the checkmark to automatically appear on the quick access toolbar? I need to do that for when I send the form template out to users, they don't have to try to add a quick launch button themselves.
|
#11
|
|||
|
|||
|
#12
|
|||
|
|||
You can use the Organizer to copy the module modSplChk from the sample to your template. (Download the latest one; I changed the name.)
I did modify the XML directly. Here is the XML for the userCustomization.xml file: Code:
<mso:customUI xmlns:doc="http://schemas.microsoft.com/office/2006/01/customui/currentDocument" xmlns:mso="http://schemas.microsoft.com/office/2006/01/customui"> <mso:ribbon> <mso:qat> <mso:documentControls> <mso:separator idQ="doc:sep1" visible="true"/> <mso:button idQ="doc:RunSpellcheck_1" visible="true" label="Run Spell Check" imageMso="TagMarkComplete" onAction="RunSpellcheck"/> <mso:separator idQ="doc:sep2" visible="true"/> </mso:documentControls> </mso:qat> </mso:ribbon> </mso:customUI> To get a userCustomization.xml file in your template, you need to do some modification to the QAT and save that modification in the template. To get access to it add .zip to the end of the filename (after .dotm) and double-click on it. After you have modified the userCustomization.xml file, save it and delete the .zip extension to change it back to a template. |
#13
|
|||
|
|||
This is a slightly enhanced version of the XML. The label statement and screentip statement are redundant, only one is needed.
Code:
<mso:customUI xmlns:doc="http://schemas.microsoft.com/office/2006/01/customui/currentDocument" xmlns:mso="http://schemas.microsoft.com/office/2006/01/customui"> <mso:ribbon> <mso:qat> <mso:documentControls> <mso:separator idQ="doc:sep1" visible="true"/> <mso:button idQ="doc:RunSpellcheck_1" visible="true" label="Run Spell Check" screentip="Run Spell Check" supertip="Run Word's spell check in this protected form." imageMso="TagMarkComplete" onAction="modSplChk.RunSpellcheck"/> <mso:separator idQ="doc:sep2" visible="true"/> </mso:documentControls> </mso:qat> </mso:ribbon> </mso:customUI> |
Tags |
form fields, macro, word 2010 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Delete Rows in Protected Table with Form Fields | Elan05 | Word VBA | 23 | 09-11-2014 12:47 PM |
Add rows in protected table with Form Fields | Apriljade | Word | 2 | 02-26-2014 06:42 AM |
Mail Merge a Protected Form Maintaining Form Fills | t/korean85 | Word | 1 | 04-07-2013 05:34 PM |
Running a Macro in a protected form | yessmarie | Word VBA | 1 | 05-25-2012 12:04 AM |
Editing Password protected form fields in Word 2007 | tamilan | Word | 2 | 02-16-2010 09:45 AM |