PBB Macros - Document language selection

Page 1 of 1 (4 items)
This post has 3 Replies | 0 Followers

Posts 2736
DominicM | Forum Activity | Posted: Sat, Sep 12 2020 11:25 AM



May prove useful for those of you wishing your PBB marked up in multiple languages

6472.Logos_Langauge.zip

Never Deprive Anyone of Hope.. It Might Be ALL They Have

Posts 1811
Robert M. Warren | Forum Activity | Replied: Sat, Sep 12 2020 3:47 PM

Thanks, Dominic. I'll have to give it a try.

Win 10 | Android 9 | Fire OS 5

Posts 412
Calvin Habig | Forum Activity | Replied: Sat, Sep 12 2020 7:23 PM

Dominic:

It interests me, but all that is in the zip folder is a .bas file.  I have no idea what to do woith it or where to put it. 

Any help appraciated. 

Cal

Posts 2736
DominicM | Forum Activity | Replied: Sun, Sep 13 2020 1:46 AM

when you are in word and you click your macro button and then edit macros, there are a list of SUB commands

you would paste the following text in there at bottom of list: 

Sub PREPROCESS_SET_DOCUMENT_BASE_LANGUAGE()
' SetLang Macro Whole Story
Dim strNoteType As String
Selection.WholeStory
strNoteType = InputBox("Set Language to -" _
& vbCr & "US - EN(US) UK - EN(UK)" _
& vbCr & "DE - German FR - French" _
& vbCr & "GK - Greek HE - Hebrew" _
& vbCr & "ES - Spanish LA - Latin" _
& vbCr & "IT - Italian AR - Arabic" _
& vbCr & "XX - NONE" _
& vbCr & vbCr & "Please input Language Code.", _
"Apply Language to Whole Document", "US")
If strNoteType = "US" Then
Selection.LanguageID = wdEnglishUS
End If
If strNoteType = "UK" Then
Selection.LanguageID = wdEnglishUK
End If
If strNoteType = "FR" Then
Selection.LanguageID = wdFrench
End If
If strNoteType = "DE" Then
Selection.LanguageID = wdGerman
End If
If strNoteType = "ES" Then
Selection.LanguageID = wdSpanish
End If
If strNoteType = "AR" Then
Selection.LanguageID = wdArabic
End If
If strNoteType = "LA" Then
Selection.LanguageID = wdLatin
End If
If strNoteType = "GK" Then
Selection.LanguageID = wdGreek
End If
If strNoteType = "HE" Then
Selection.LanguageID = wdHebrew
End If
If strNoteType = "IT" Then
Selection.LanguageID = wdItalian
End If
If strNoteType = "XX" Then
Selection.LanguageID = wdLanguageNone
End If
'ActiveDocument.Save
End Sub

Sub MARKUP_SetDocLangtoUS()
' SetLang US Macro
Selection.WholeStory
Selection.LanguageID = wdEnglishUS
End Sub

Sub MARKUP_SET_LANGUAGE_MULTI()
' SetLang to Selection
Dim strNoteType As String
strNoteType = InputBox("Set Language to -" _
& vbCr & "US - EN(US) UK - EN(UK)" _
& vbCr & "DE - German FR - French" _
& vbCr & "GK - Greek HE - Hebrew" _
& vbCr & "ES - Spanish LA - Latin" _
& vbCr & "IT - Italian AR - Arabic" _
& vbCr & "XX - NONE" _
& vbCr & vbCr & "Please input Language Code.", _
"Apply Language to Section", "US") 'Change US to your default
If strNoteType = "US" Then
Selection.LanguageID = wdEnglishUS
End If
If strNoteType = "UK" Then
Selection.LanguageID = wdEnglishUK
End If
If strNoteType = "FR" Then
Selection.LanguageID = wdFrench
End If
If strNoteType = "DE" Then
Selection.LanguageID = wdGerman
End If
If strNoteType = "ES" Then
Selection.LanguageID = wdSpanish
End If
If strNoteType = "AR" Then
Selection.LanguageID = wdArabic
End If
If strNoteType = "LA" Then
Selection.LanguageID = wdLatin
End If
If strNoteType = "GK" Then
Selection.LanguageID = wdGreek
End If
If strNoteType = "HE" Then
Selection.LanguageID = wdHebrew
End If
If strNoteType = "IT" Then
Selection.LanguageID = wdItalian
End If
If strNoteType = "XX" Then
Selection.LanguageID = wdLanguageNone
End If
End Sub

Never Deprive Anyone of Hope.. It Might Be ALL They Have

Page 1 of 1 (4 items) | RSS