none
disable "Do not check spelling or grammar" in char style RRS feed

  • Question

  • Hi.  

    I would like to blank the choice "Do not check spelling or grammar" in the Modify Style, Format, Language panel.  When I look at this through the GUI, I find the check box filled in solid.  This makes me think the option is partially on.  Where do I find/edit the partial selection?

    This doc is a template.

    The style is a char style based on default paragraph font.

    The 'Normal' paragraph style has the 'Do not check spelling or grammar' box unchecked.

    Thanks Ken

    Monday, August 27, 2012 5:53 PM

Answers

  • Hi Ken,

    Thanks for posting in the MSDN Forum.

    As far as I know the option "Do not check spelling or grammar" is a Global option of the Word application. You will access it via click language on statu bar.

    I hope following snippet will help you:

    Sub Macro1()
        Selection.LanguageID = wdEnglishUS
        Selection.NoProofing = True 'Is Control the "Do not check spelling or grammar" checkbox.
        Application.CheckLanguage = False
    End Sub

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us


    Tuesday, August 28, 2012 6:34 AM
    Moderator
  • I have a solution to this using the GUI.  I have not tried to do this through code yet.  

    A more detailed description of the problem:

    I needed a char style (let's call it 'NewText') to check spelling even if the paragraph style that contains NewText is set to not check spelling.  If I change the 'Do not check spelling or grammar' checkbox (Modify style - Format - Language) from solid to blank and choose OK, the change will not be retained, and NewText will inherit the settings for checking spelling based on the parent paragraph style.

    The solution: - Which really makes no sense to me.

    In the Modify Style - Format - Language panel, choose a new language - any language.  Now uncheck the 'Do not check spelling or grammar' checkbox. Choose OK.  Go back in to the same panel and select the original language (English (U.S.) for me).  The change will be retained, and spelling and grammar will be checked in NewText regardless of the parent style.

    Out of curiosity, I will duplicate this programmatically,  but since I saved it to the controlling template my problem is solved.

    If anyone has insight on why Word behaves this way please enlighten me.  I'm sure the knowledge will help me next time I run into one of Word's oddities.

    Thanks for the help and Ideas.

    Ken

    • Marked as answer by kbax Tuesday, September 4, 2012 5:06 PM
    Tuesday, September 4, 2012 4:58 PM

All replies

  • Hi Ken,

    Thanks for posting in the MSDN Forum.

    As far as I know the option "Do not check spelling or grammar" is a Global option of the Word application. You will access it via click language on statu bar.

    I hope following snippet will help you:

    Sub Macro1()
        Selection.LanguageID = wdEnglishUS
        Selection.NoProofing = True 'Is Control the "Do not check spelling or grammar" checkbox.
        Application.CheckLanguage = False
    End Sub

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us


    Tuesday, August 28, 2012 6:34 AM
    Moderator
  • I need to control proofing by style namely off in paragraph style, on in char style.  Since the char style seems to inherit the setting from the parent paragraph style I am not able to force it through the gui.  I was hoping for a programatic method.

    Tuesday, August 28, 2012 11:25 PM
  • Hi Ken,

    I'm not sure I catch your mean.

    Would you please reproduce your scenario step by step here?

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, August 30, 2012 2:39 AM
    Moderator
  • I have a solution to this using the GUI.  I have not tried to do this through code yet.  

    A more detailed description of the problem:

    I needed a char style (let's call it 'NewText') to check spelling even if the paragraph style that contains NewText is set to not check spelling.  If I change the 'Do not check spelling or grammar' checkbox (Modify style - Format - Language) from solid to blank and choose OK, the change will not be retained, and NewText will inherit the settings for checking spelling based on the parent paragraph style.

    The solution: - Which really makes no sense to me.

    In the Modify Style - Format - Language panel, choose a new language - any language.  Now uncheck the 'Do not check spelling or grammar' checkbox. Choose OK.  Go back in to the same panel and select the original language (English (U.S.) for me).  The change will be retained, and spelling and grammar will be checked in NewText regardless of the parent style.

    Out of curiosity, I will duplicate this programmatically,  but since I saved it to the controlling template my problem is solved.

    If anyone has insight on why Word behaves this way please enlighten me.  I'm sure the knowledge will help me next time I run into one of Word's oddities.

    Thanks for the help and Ideas.

    Ken

    • Marked as answer by kbax Tuesday, September 4, 2012 5:06 PM
    Tuesday, September 4, 2012 4:58 PM