Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Feb 2009
    Posts
    308
    Thanks
    0
    Thanked 1 Time in 1 Post
    While running a spellcheck on various docs, I notice that Word will sometimes indicate that it cannot spell check some text b/c it considers it a non-native language like Portuguese, etc. I've been tasked with identifying and "killing" this text. By this I assume rewriting it so that it's recognized as English by Word.

    In the spell check function, I find Word a bit unclear about what specific text (just a word, paragraph, entire section?) it considers to be non-native (and why, since it's regular, non-technical writing in many instances---but that's a less important question to answer) and what the best way of identifying and fixing the relevant text. If it's a long passage, I'd rather not have to rewrite it from scratch. I also wonder what causes this.

    Anyone?

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    If you just want to fix it then use Control-A to select all the text and then Tools > Language > Set Language to set everything to the correct language.

    This won't tell you which ranges of text had the problem, but do you really care?

  3. #3
    3 Star Lounger
    Join Date
    Feb 2009
    Posts
    308
    Thanks
    0
    Thanked 1 Time in 1 Post
    Thanks...and no.

  4. #4
    2 Star Lounger
    Join Date
    May 2006
    Location
    Currently in Europe
    Posts
    103
    Thanks
    7
    Thanked 0 Times in 0 Posts
    The situation can be much nastier than that...

    I work in an international environment where text is copied from all kinds of sources. I was carpeted by my manager for letting really grotesque spelling errors slip through a final review - and I had done the Ctrl-A, set to English, re-check spelling maneuver!

    Turns out that STYLES can be set to "do not check spelling or grammar", and that styles set this way can be copied into a document and infest the text as Char (etc) styles...

    I ended up creating a macro to cycle through all the styles in use, setting "no proofing" = false. (If you go down this path, test for wdStyleTypeTable and wdStyleTypeList - they have no setting available for proofing).
    Stylus

  5. #5
    3 Star Lounger
    Join Date
    Feb 2009
    Posts
    308
    Thanks
    0
    Thanked 1 Time in 1 Post
    Thanks, Stylus. I might need to do as you did because I believe the same thing is happening in my situation- there's quite a bit of residual report excerpts that folks paste into newer reports, leading to a kind of perpetuation of this sort of thing. Can you give me more instruction about how to create that macro?

    Thanks.

  6. #6
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    [quote name='ben000' post='771368' date='20-Apr-2009 15:44']Can you give me more instruction about how to create that macro?[/quote]
    You want a Macro something like
    Code:
    Public Sub ClearNoProofing()
     Dim sty As Style
     Dim rngStory As Range
     
    	 For Each rngStory In ActiveDocument.StoryRanges
    		 rngStory.NoProofing = False
    	 Next rngStory
    	 
    	 For Each sty In ActiveDocument.Styles
    		 Select Case sty.Type
    			 Case wdStyleTypeCharacter, wdStyleTypeParagraph
    				 sty.NoProofing = False
    			 Case Else
    		 End Select
    	 Next sty
     End Sub
    Do you know how to create a macro with this code?

  7. #7
    3 Star Lounger
    Join Date
    Feb 2009
    Posts
    308
    Thanks
    0
    Thanked 1 Time in 1 Post
    Thanks, Stuart. Sadly, I do not. Got any advice or links to some helpful instructions?

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    See for example Post 21373.

  9. #9
    3 Star Lounger
    Join Date
    Feb 2009
    Posts
    308
    Thanks
    0
    Thanked 1 Time in 1 Post
    Many thanks.

  10. #10
    2 Star Lounger
    Join Date
    May 2006
    Location
    Currently in Europe
    Posts
    103
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Sorry I missed your question - my attendance on this site is not always regular.

    I see that you have gotten help better than any I could offer. That I can point to the concept, and have managed to create an embarrassing mash of code that somehow limps to a result, does not mean that I am a good VB coder.

    In the case at hand, I ran through if-then tests to bypass the unwanted style types, which is slow. Stuart used Case to check for what is wanted. Must more efficient. (Thanks Stewart, for the 1000th time I have learned something from one of your posts!)
    Stylus

Posting Permissions

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