View Single Post
 
Old 08-27-2020, 01:46 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

OK, I see your sample has lots of section breaks and it appears that consistently your right column is content in a section that follows a column break. This pattern could break in a real document if a section continues to a new page but based on your sample, this code works to assign a different language to anything following a column break.
Code:
Sub SetLanguages()
  Dim aSect As Section, aRng As Range, lngPos As Long
  ActiveDocument.Range.LanguageID = wdGerman    'language for first column
  For Each aSect In ActiveDocument.Sections
    Set aRng = aSect.Range
    lngPos = InStr(aRng.Text, Chr(14))
    If lngPos > 0 Then
      aRng.MoveStart Unit:=wdCharacter, Count:=lngPos
      aRng.LanguageID = wdEnglishAUS            'language for second column
    End If
  Next aSect
End Sub
If you wanted to work with styles with languages assigned (and you should) you can change
aRng.LanguageID = wdEnglishAUS
to
aRng.Style= "Normal"
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote