View Single Post
 
Old 06-26-2014, 12:02 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You might try a macro like:
Code:
Sub SetPolishSpelling()
Dim i As Long, j As Long, k As Long
With ActiveDocument
  Application.ResetIgnoreAll
  With .Range
    .LanguageID = wdGerman
    .NoProofing = False
    For i = 1 To .Sentences.Count
      With .Sentences(i)
        If .SpellingErrors.Count > 0 Then
          j = .SpellingErrors.Count
          .LanguageID = wdPolish
          If .SpellingErrors.Count > j Then
            .LanguageID = wdGerman
            For k = 1 To .SpellingErrors.Count
              .SpellingErrors(i).HighlightColorIndex = wdYellow
            Next
          Else
            For k = 1 To .SpellingErrors.Count
              .SpellingErrors(i).HighlightColorIndex = wdBrightGreen
            Next
          End If
        End If
      End With
    Next
  End With
End With
End Sub
In theory, the above macro should convert each 'sentence' that has more spelling errors as a German sentence than as a Polish sentence to Polish. In either case, any residual spelling errors will be highlighted. One limitation of looping through sentences is that what Word VBA regards as a sentence includes phrases terminated by periods such as you might have after an abbreviation (e.g. Mr., Mrs.). If your German & Polish sentences were in different paragraphs, checking would be much easier and probably more reliable.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote