Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    171
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi all,

    How can I set Word's Spell Checker to ignore code examples? That would entail recognizing a style (e.g., Code_style) or a font (e.g., Courier New).

    I would have thought that selecting a style, and then in Modify Style, if I would set Format > Language > Do not check spelling or grammar, that should do it. But it has no effect.

    TIA

    avi

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 28 Times in 27 Posts
    avi,

    This may be one of those instances where a modification made to the style definition, doesn't flow through automatically to the paragraphs in the document which have that style applied.

    What happens if you reapply the (modified) style to the code paragraphs? Based on a quick test here, that may work (in fact, I applied it to one test paragraph, and the change immediately flowed through to all the other test paragraphs in the document, that had that style - weird!)

    Gary

  4. #3
    WS Lounge VIP
    Join Date
    Mar 2006
    Location
    Maryland, USA
    Posts
    677
    Thanks
    17
    Thanked 57 Times in 50 Posts
    Adding do not check spelling or grammar to the style definition has worked for me. So I agree with Gary that you may need to reapply the style. You can also put that setting in a character style.

    Gary, what you describe happens if automatically update is on.

    Pam
    Pam Caswell

  5. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 28 Times in 27 Posts
    Quote Originally Posted by PamCaswell View Post
    Gary, what you describe happens if automatically update is on.
    Pam,

    In this case, 'Automatically update' was off - that's why I thought it was weird how the change flowed through the entire document when I reapplied the style to one paragraph.
    (In general, I avoid 'Automatically update' like the plague! - it's way too easy to mess up not just the document, but the styles themselves, with that setting turned on.)

    Gary

  6. #5
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    171
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi Gary,
    Hi Pam,

    Pleased to meet you both.

    I also remember that adding 'Do not check spelling or grammar' to the style definition has worked for me in the past, when I was just playing with it - but now I need it for a real; I have a 200 page API prog. guide here with millions of lines and words of code.

    Ok, I can now confirm Gary's experience that you have to reapply the style. Obviously you should not have to do that.
    I also found that sometimes the change to one word or line flows through the rest. But not always.

    So I tried various tricks to make that always work. Like:
    - Find+SelectAll for that style and then reapply the style.
    - Run Find+Reapply using a macro.
    Both did not help.

    ***Then I closed the document and then reopened it, and I found that the No-Check update had been reapplied everywhere to all instances of that style.

    So not perfect - but I think it will work.
    And that's great, coz it will really make the spell checker usable when working with development documents.

    tnx

    avi
    \

  7. #6
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    171
    Thanks
    3
    Thanked 0 Times in 0 Posts
    That just made life a lot easier and better :-)

    Hope I can keep it working...

    avi

  8. #7
    4 Star Lounger
    Join Date
    Jan 2010
    Location
    Chichester, UK
    Posts
    400
    Thanks
    1
    Thanked 10 Times in 9 Posts
    Possibly creating a new style called 'Code' based on No Style which has proofing off would stop what has been happening?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •