Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2014, 08:00 AM
rharvey1215 rharvey1215 is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 64bit
Novice
Spellcheck macro for protected form fields needed
 
Join Date: Mar 2014
Posts: 4
rharvey1215 is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 03-19-2014, 08:53 AM
Charles Kenyon Charles Kenyon is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

"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.
Reply With Quote
  #3  
Old 03-19-2014, 10:08 AM
rharvey1215 rharvey1215 is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 64bit
Novice
Spellcheck macro for protected form fields needed
 
Join Date: Mar 2014
Posts: 4
rharvey1215 is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 03-20-2014, 05:02 AM
Charles Kenyon Charles Kenyon is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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?
Reply With Quote
  #5  
Old 03-20-2014, 05:06 AM
Charles Kenyon Charles Kenyon is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by rharvey1215 View Post
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.
The macro works, for me, in Word 2010. To double check that I was using the original macro, and not something I modified, I took the sample posted on the page linked previously and saved it in .dotm format. It works fine. Try it here.

(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.)
Reply With Quote
  #6  
Old 03-20-2014, 06:47 AM
rharvey1215 rharvey1215 is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 64bit
Novice
Spellcheck macro for protected form fields needed
 
Join Date: Mar 2014
Posts: 4
rharvey1215 is on a distinguished road
Default

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.
Reply With Quote
  #7  
Old 03-20-2014, 07:22 AM
Charles Kenyon Charles Kenyon is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #8  
Old 03-20-2014, 12:02 PM
rharvey1215 rharvey1215 is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 64bit
Novice
Spellcheck macro for protected form fields needed
 
Join Date: Mar 2014
Posts: 4
rharvey1215 is on a distinguished road
Default

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?
Reply With Quote
  #9  
Old 03-20-2014, 05:39 PM
Charles Kenyon Charles Kenyon is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #10  
Old 03-31-2014, 09:36 AM
donnam731 donnam731 is offline Spellcheck macro for protected form fields needed Windows 7 32bit Spellcheck macro for protected form fields needed Office 2010 32bit
Novice
 
Join Date: Mar 2014
Posts: 1
donnam731 is on a distinguished road
Default

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.
Reply With Quote
  #11  
Old 03-31-2014, 05:56 PM
Charles Kenyon Charles Kenyon is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

  1. Unprotect your template.
  2. Copy the macro from the Add-In to your template then modify the QAT to put a button for the macro on the QAT.
  3. Installing Macros
  4. Modifying the QAT and Ribbon in Microsoft Word
  5. Save the modification in the template, not for all documents.
  6. I would recommend also assigning the F7 key to the macro, again saving the shortcut in the template.
  7. I forget how I got the Check icon. Either by clicking on the modify button in the QAT modification dialog, or by editing the XML in the template.
  8. The method for modifying the XML requires that you follow the directions on Greg Maxey's page. Modify Quick Access Toolbar (QAT) Button Image or Text
I'll check later and see which image I used if I modified the XML. Actually, when I think of it, I suspect you could simply copy the XML for the customization directly from the template.
Reply With Quote
  #12  
Old 03-31-2014, 06:31 PM
Charles Kenyon Charles Kenyon is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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>
It is the line "imageMso="TagMarkComplete" that gives the checkmark instead of a generic macro icon.

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.
Reply With Quote
  #13  
Old 03-31-2014, 06:47 PM
Charles Kenyon Charles Kenyon is offline Spellcheck macro for protected form fields needed Windows 7 64bit Spellcheck macro for protected form fields needed Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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>
That added a "supertip" and is the one that is here.
Reply With Quote
Reply

Tags
form fields, macro, word 2010



Similar Threads
Thread Thread Starter Forum Replies Last Post
Spellcheck macro for protected form fields needed 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
Spellcheck macro for protected form fields needed 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

Other Forums: Access Forums

All times are GMT -7. The time now is 08:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft