Sub sleep(tSecs As Single) ' Timer to create a pause Dim sngSec As Single sngSec = Timer + tSecs Do While Timer < sngSec DoEvents Loop End Sub Sub LingueeDeEnFx() ' ' LingueeDeEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the linguee.de translation memory database (DE>EN) ' Optional addition: "mymemory" search. To activate, delete the ' apostrophes at the beginning of the line or lines that follow ' the lines marked with OPTIONAL. ' To deactivate again, enter an apostrofe at beginning of line ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace spaces between words with the plus sign theTerm = Replace(theTerm, "", "") ' Replace any degree signs with code the browser will understand theTerm = Replace(theTerm, "", "%E4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%DC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 ' OPTIONAL (4 following lines): ' URL1 = "http://mymemory.translated.net/t/German/English/" ' URL1 = URL1 & theTerm ' Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) ' You may need to modify the path for your Firefox.exe file ' sleep 0.5 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command URL = "https://www.linguee.de/deutsch-englisch/search?source=auto&query=" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the translation memory databases linguee.de and, optionally, mymemory.translated.net. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub LingueeDeItFx() ' ' LingueeDeItFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the linguee.de translation memory database (DE>IT) ' Optional addition: "mymemory" search. To activate, delete the ' apostrophes at the beginning of the line or lines that follow ' the lines marked with OPTIONAL. ' To deactivate again, enter an apostrofe at beginning of line ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace spaces between words with the plus sign theTerm = Replace(theTerm, "", "") ' Replace any degree signs with code the browser will understand theTerm = Replace(theTerm, "", "%E4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%DC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 ' OPTIONAL (4 following lines): ' URL1 = "http://mymemory.translated.net/t/German/Italian/" ' URL1 = URL1 & theTerm ' Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) ' You may need to modify the path for your Firefox.exe file ' sleep 0.5 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command URL = "https://www.linguee.de/deutsch-italienisch/search?source=auto&query=" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the translation memory databases linguee.de and, optionally, mymemory.translated.net. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub LingueeFrEnFx() ' ' LingueeFrEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the linguee.fr translation memory database (FR>EN) ' Optional addition: "mymemory" search. To activate, delete the ' apostrophes at the beginning of the line or lines that follow ' the lines marked with OPTIONAL. ' To deactivate again, enter an apostrofe at beginning of line ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces on left and right of phrase theTerm = Replace(theTerm, " ", "+") ' Replace spaces between words with the plus sign theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "%E0") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E1") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E8") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%ED") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EE") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F3") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FB") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "'", "%27") ' Replace any ' characters with code the browser will understand theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 ' OPTIONAL (4 following lines): ' URL1 = "http://mymemory.translated.net/t/French/English/" ' URL1 = URL1 & theTerm ' Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) ' You may need to modify the path for your Firefox.exe file ' sleep 0.5 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command URL = "http://www.linguee.fr/francais-anglais/search?source=auto&query=" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the translation memory databases linguee.de and, optionally, mymemory.translated.net. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub LingueeFrDeFx() ' ' LingueeFrDeFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the linguee.fr translation memory database (FR>DE) ' Optional addition: mymemory.translated.net. To activate, delete the ' apostrophes at the beginning of the line or lines that follow ' the lines marked with OPTIONAL. ' To deactivate again, enter an apostrofe at beginning of line ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces on left and right of phrase theTerm = Replace(theTerm, " ", "+") ' Replace spaces between words with the plus sign theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "%E0") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E1") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E8") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%ED") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EE") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F3") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FB") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "'", "%27") ' Replace any ' characters with code the browser will understand theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 ' OPTIONAL (4 following lines): ' URL1 = "https://mymemory.translated.net/en/French/German/" ' URL1 = URL1 & theTerm ' Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) ' You may need to modify the path for your Firefox.exe file ' sleep 0.5 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command URL = "http://www.linguee.fr/francais-allemand/search?source=auto&query=" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the translation memory databases linguee.fr and, optionally, mymemory.translated.net. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub LingueeItEnFx() ' ' LingueeItEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the linguee.it translation memory database (IT>EN) ' Optional addition: "mymemory" search. To activate, delete the ' apostrophes at the beginning of the line or lines that follow ' the lines marked with OPTIONAL. ' To deactivate again, enter an apostrofe at beginning of each line ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces on left and right of phrase theTerm = Replace(theTerm, " ", "+") ' Replace spaces between words with the plus sign theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "%E0") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C0") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E1") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C1") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E8") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C8") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%CA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%ED") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%CD") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%CC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EE") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%CE") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F3") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D3") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%DA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FB") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%DB") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "'", "%27") ' Replace any ' characters with code the browser will understand theTerm = Replace(theTerm, "", "%E7") ' Remove any with code %C3%A7 theTerm = Replace(theTerm, "", "%C7") ' Remove any with code %C3%A7 ' OPTIONAL (4 following lines): ' URL1 = "http://mymemory.translated.net/t/Italian/English/" ' URL1 = URL1 & theTerm ' Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) ' You may need to modify the path for your Firefox.exe file ' sleep 0.5 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command URL = "http://www.linguee.it/italiano-inglese/search?source=auto&query=" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the translation memory databases linguee.de and, optionally, mymemory.translated.net. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub LingueeDeFrFx() ' ' LingueeDeFrFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the linguee.it translation memory database (DE>FR) ' Optional addition: mymemory.translated.net. To activate, delete the ' apostrophes at the beginning of the line or lines that follow ' the lines marked with OPTIONAL. ' To deactivate again, enter an apostrofe at beginning of each line ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces on left and right of phrase theTerm = Replace(theTerm, " ", "+") ' Replace spaces between words with the plus sign theTerm = Replace(theTerm, "", "") ' Replace any degree signs with code the browser will understand theTerm = Replace(theTerm, "", "%E4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%DC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 ' OPTIONAL (4 following lines): ' URL1 = "https://mymemory.translated.net/en/German/French/" ' URL1 = URL1 & theTerm ' Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) ' You may need to modify the path for your Firefox.exe file ' sleep 0.5 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command URL = "https://www.linguee.de/deutsch-franzoesisch/search?source=auto&query=" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the translation memory database linguee.de and, optionally, mymemory.translated.net. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub LingueeItFrFx() ' ' LingueeItFrFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the linguee.it translation memory database (IT>FR) ' Optional addition: mymemory.translated.net. To activate, delete the ' apostrophes at the beginning of the line or lines that follow ' the lines marked with OPTIONAL. ' To deactivate again, enter an apostrofe at beginning of each line ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces on left and right of phrase theTerm = Replace(theTerm, " ", "+") ' Replace spaces between words with the plus sign theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "%E0") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C0") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E1") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C1") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E8") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C8") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%E9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%CA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%ED") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%CD") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%CC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%EE") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%CE") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D2") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F3") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D3") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D9") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%DA") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FB") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%DB") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "'", "%27") ' Replace any ' characters with code the browser will understand theTerm = Replace(theTerm, "", "%E7") ' Replace any with code %C3%A7 theTerm = Replace(theTerm, "", "%C7") ' Replace any with code %C3%A7 ' OPTIONAL (4 following lines): ' URL1 = "https://mymemory.translated.net/en/Italian/French/" ' URL1 = URL1 & theTerm ' Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) ' You may need to modify the path for your Firefox.exe file ' sleep 0.5 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command URL = "https://www.linguee.it/italiano-francese/search?query=" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the translation memory database linguee.it and, optionally, mymemory.translated.net. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub CollinsEnFx() ' ' CollinsEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Collins English dictionary ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "https://www.collinsdictionary.com/dictionary/english/" URL = URL + theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Collins dictionary for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub OALDOnlineEnFx() ' ' OALDOnlineEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online OALD dictionary ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "http://www.oxfordlearnersdictionaries.com/definition/english/" URL = URL + theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online OALD dictionary for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub OxfordDictionariesEnFx() ' ' OxfordDictionariesEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Oxford dictionaries ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "https://en.oxforddictionaries.com/definition/" URL = URL + theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Oxford dictionaries for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub CambridgeEnFx() ' ' CambridgeEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Cambridge dictionary ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "http://dictionary.cambridge.org/dictionary/english/" URL = URL + theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Cambridge dictionary for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub MerriamWebsterEnFx() ' ' MerriamWebsterEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Merriam-Webster dictionary ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "http://www.merriam-webster.com/dictionary/" URL = URL + theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Merriam-Webster dictionary for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub ChambersEnFx() ' ' ChambersEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Chambers dictionary ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "http://chambers.co.uk/search/?query=" URL = URL + theTerm URL = URL + "&title=21st" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Chambers dictionary for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub SynonymsEnFx() ' ' SynonymsEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Thesaurus ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "https://www.thesaurus.com/browse/" URL = URL + theTerm URL = URL + "&title=21st" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Thesaurus for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub TausDeEnFx() ' ' TausDeEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the Taus translation memory database (DE>EN) at tausdata.org ' and the Mymemory database (DE>EN) at mymemory.translated.net at the same time ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary and URLs created On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces either side of the term theTerm = Replace(theTerm, " ", "%20") ' Replace spaces within a phrase with code the browser will understand theTerm = Replace(theTerm, "", "") ' Replace any degree signs with code the browser will understand theTerm = Replace(theTerm, "", "%C3%A4") ' Remove any with code %C3%A4 theTerm = Replace(theTerm, "", "%C3%B6") ' Remove any with code %C3%B6 theTerm = Replace(theTerm, "", "%C3%BC") ' Remove any with code %C3%BC theTerm = Replace(theTerm, "", "%C3%9F") ' Remove any with code %C3%9F theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 URL = "http://www.tausdata.org/?direction=forward&direction=reverse&direction=matrix&vault=1&q=%22" URL = URL + theTerm URL = URL + "%22&source_lang=de-de&target_lang=en-gb" URL1 = "http://mymemory.translated.net/t/German/English/" URL1 = URL1 & theTerm ' Open the first database page ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) sleep 1 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command ' Open the second database page ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online TAUS translation memory database (German-English). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub TausFrEnFx() ' ' TausFrEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the Taus translation memory database (FR>EN) at tausdata.org ' and the Mymemory database (FR>EN) at mymemory.translated.net at the same time ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary and URLs created On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces either side of the term theTerm = Replace(theTerm, " ", "%20") ' Replace spaces within a phrase with code the browser will understand theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 URL = "http://www.tausdata.org/?direction=forward&direction=reverse&direction=matrix&vault=1&q=%22" URL = URL + theTerm URL = URL + "%22&source_lang=fr-fr&target_lang=en-gb" URL1 = "http://mymemory.translated.net/t/French/English/" URL1 = URL1 & theTerm ' Open the first database page ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) sleep 1 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command ' Open the second database page ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online TAUS translation memory database (French-English). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub TausItEnFx() ' ' TausItEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches the Taus translation memory database (IT>EN) at tausdata.org ' and the Mymemory database (IT>EN) at mymemory.translated.net at the same time ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionary and URLs created On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Trim(theTerm) ' Remove any spaces either side of the term theTerm = Replace(theTerm, " ", "%20") ' Replace spaces within a phrase with code the browser will understand theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 URL = "http://www.tausdata.org/?direction=forward&direction=reverse&direction=matrix&vault=1&q=%22" URL = URL + theTerm URL = URL + "%22&source_lang=it-it&target_lang=en-gb" URL1 = "http://mymemory.translated.net/t/Italian/English/" URL1 = URL1 & theTerm ' Open the first database page ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) sleep 1 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command ' Open the second database page ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online TAUS translation memory database (Italian-English). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub PonsDeEnFx() ' ' PonsDeEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online PONS dictionary (DE>EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "http://de.pons.com/bersetzung?q=" URL = URL & theTerm URL = URL & "&l=deen&in=&lf=de" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online PONS dictionary (DE>EN) for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub WordrefDeEnFx() ' ' WordrefDeEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Wordreference dictionary (DE>EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "http://www.wordreference.com/deen/" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Wordreference dictionary (DE>EN) for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub WordrefFrEnFx() ' ' WordrefFrEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Wordreference dictionary (FR>EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "http://www.wordreference.com/fr/en/translation.asp?fren=" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Wordreference dictionary (FR>EN) for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub WordrefItEnFx() ' ' WordrefItEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Wordreference dictionary (IT>EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces URL = "http://www.wordreference.com/it/en/translation.asp?iten=" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Wordreference dictionary (IT>EN) for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub LeoOrgDictCcDeEnDeFx() ' ' LeoOrgDictCcDeEnDeFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Leo.org and Dict.cc dictionaries (DE>EN) ' Dim theTerm, URL, URL1 As String ' Term to look up in dictionaryDim theTerm As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, "", "") ' Replace any degree signs with code the browser will understand theTerm = Replace(theTerm, "", "%E4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%D6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%DC") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 URL = "http://dict.leo.org/?lp=ende&lang=de&searchLoc=0&cmpType=relaxed&relink=on§Hdr=on&spellToler=std&search=" URL = URL & theTerm URL1 = "http://www.dict.cc/deutsch-englisch/" URL1 = URL1 & theTerm URL1 = URL1 & ".html" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL1) sleep 0.5 ' waits 0.5 seconds by carrying out the sleep macro to allow completion of the previous command ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Leo.org and Dict.cc dictionaries (DE>EN) for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub LangenscheidtDeEnFx() ' ' LangenscheidtDeEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Langenscheidt dictionary (DE>EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Trim(theTerm) theTerm = Replace(theTerm, "", "") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "ae") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "Ae") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "oe") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "Oe") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "ue") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "Ue") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 URL = "https://de.langenscheidt.com/deutsch-englisch/" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Langenscheidt dictionary (DE>EN) for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub RepubblicaDictItEnFx() ' ' RepubblicaDictItEnFx macro - USES Firefox ' by Tanya Harvey Ciampi ' Searches for a word highlighted in MS Word in the online Repubblica dictionary (IT>EN) ' Dim Newsite As Variant Dim theTerm, URL As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any extra spaces theTerm = Replace(theTerm, " ", "%20") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "a") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "i") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "o") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "o") ' Replace any characters with the code that the browser will understand URL = "http://dizionari.repubblica.it/cgi-bin/inglese/find?" URL = URL & theTerm URL = URL & "&it" Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for a word highlighted in MS Word in the online Repubblica dictionary (IT>EN). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub CollinsItEnFx() ' ' CollinsItEnFx macro - USES Firefox ' by Tanya Harvey Ciampi ' Searches for a word highlighted in MS Word in the online Collins dictionary (IT>EN) ' Dim Newsite As Variant Dim theTerm, URL As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any extra spaces theTerm = Replace(theTerm, " ", "%20") ' Remove paragraph breaks in the highlighted phrase theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "%E4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FC") ' Replace any characters with code the browser will understand ' Construct the URL to search the dictionary URL = "http://www.collinsdictionary.com/dictionary/italian-english/" URL = URL & theTerm Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for a word highlighted in MS Word in the online Collins dictionary (IT>EN). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub RepubblicaDictEnItFx() ' ' RepubblicaDictEnItFx macro - USES Firefox ' by Tanya Harvey Ciampi ' Searches for a word highlighted in MS Word in the online Repubblica dictionary (EN>IT) ' Dim Newsite As Variant Dim theTerm, URL As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any extra spaces theTerm = Replace(theTerm, " ", "%20") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "a") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "i") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "o") ' Replace any characters with the code that the browser will understand theTerm = Replace(theTerm, "", "o") ' Replace any characters with the code that the browser will understand URL = "http://dizionari.repubblica.it/cgi-bin/inglese/find?" URL = URL & theTerm URL = URL & "&en" Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for a word highlighted in MS Word in the online Repubblica dictionary (EN>IT). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub LarousseFrEnFx() ' ' LarousseFrEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the online Larousse dictionary (FR>EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "%20") ' Remove any paragraph breaks in highlighted phrase ' theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand ' theTerm = Replace(theTerm, "", "%E0") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%E1") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%E8") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%E9") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%ED") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%EC") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%F2") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%F3") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%F4") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%F9") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%FA") ' Replace any characters with code the browser will understand ' theTerm = Replace(theTerm, "", "%FB") ' Replace any characters with code the browser will understand URL = "http://www.larousse.fr/dictionnaires/francais-anglais/" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the online Larousse dictionary (FR>EN) for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub CollinsFrEnFx() ' ' CollinsFrEnFx macro - USES Firefox ' by Tanya Harvey Ciampi ' Searches for a word highlighted in MS Word in the online Collins dictionary (FR>EN) ' Dim Newsite As Variant Dim theTerm, URL As String ' Term to look up in dictionary On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any extra spaces theTerm = Replace(theTerm, " ", "%20") ' Remove paragraph breaks in the highlighted phrase theTerm = Replace(theTerm, "", "%b0") ' Replace any degree signs with the code that the browser will understand theTerm = Replace(theTerm, "", "%E4") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%F6") ' Replace any characters with code the browser will understand theTerm = Replace(theTerm, "", "%FC") ' Replace any characters with code the browser will understand ' Construct the URL to search the dictionary URL = "http://www.collinsdictionary.com/dictionary/french-english/" URL = URL & theTerm Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for a word highlighted in MS Word in the online Collins dictionary (FR>EN). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub WikipediaFx() ' ' WikipediaFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in Wikipedia ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol URL = "https://www.google.ch/#hl=en&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+inurl:wikipedia.org" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches Wikipedia for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub SearchGoogleBooksFx() ' ' SearchGoogleBooksFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in Google Books ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.ch/search?q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "%20intitle%3Adictionary&hl=en&rlz=1T4ADFA_itCH373CH373&um=1&ie=UTF-8&tbo=u&tbs=bks:1&source=og&sa=N&tab=wp" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches Google Books for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub DudenDeFx() ' ' DudenDeFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the DUDEN monolingual German dictionary (DE) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces ' The URL to open is the following composed as follows URL = "https://www.duden.de/suchen/dudenonline/" URL = URL & theTerm ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches the Duden monolingual German dictionary for a word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub MySwitzerlandFx() ' ' MySwitzerlandFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word on the MySwitzerland.com multilingual website ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.ch/#hl=en&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+inurl:myswitzerland.com" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on the MySwitzerland.com multilingual website. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub IateDeEnFx() ' ' IateDeEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in IATE - The EU's multilingual term base ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces ' The URL to open is the following composed as follows URL = "http://iate.europa.eu/SearchByQuery.do?method=search&&query=" URL = URL & theTerm ' add closing quotation marks URL = URL & "&sourceLanguage=de&domain=0&matching=&start=0&next=1&targetLanguages=en" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word in IATE - The EU's multilingual term base. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub GoogleSearchEuFx() ' ' GoogleSearchEuFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in parallel texts on the EU website ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.ch/#hl=en&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+site:europa.eu" URL = URL & "+%22" URL = URL & "eur-lex" URL = URL & "%22" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word in parallel texts on the EU website. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub AdminChFx() ' ' AdminChFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word on the admin.ch multilingual website ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces before or after theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.com/#hl=en&sclient=psy-ab&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+inurl:admin.ch+english+" URL = URL & "-filetype:pdf" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on the admin.ch multilingual website. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub TermdatDeEnFx() ' ' TermdatDeEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the Swiss Confederation's TERMDAT database (DE-EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces ' The URL to open is the following composed as follows URL = "https://www" URL = URL & ".termdat.bk.admin.ch/Search/Search?Search.SearchPhrase=" URL = URL & theTerm ' add the search term URL = URL & "&Search.SourceLanguage=2&Search.TargetLanguage=3&Search.MaxAnswers=25&Search.ShowNumberOfColumns=2&Search.PriviledgedSubjectArea=0&language=en" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on the Swiss Confederation's TERMDAT database (DE-EN). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub EdaAdminChFx() ' ' EdaAdminChFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word on the eda.admin.ch multilingual website (DE-EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.com/#hl=en&sclient=psy-ab&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+inurl:eda.admin.ch" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on eda.admin.ch multilingual website (DE-EN). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub BafuAdminChFx() ' ' BafuAdminChFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word on the bafu.admin.ch multilingual website (DE-EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.com/#hl=en&sclient=psy-ab&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+inurl:bafu.admin.ch" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on bafu.admin.ch multilingual website (DE-EN). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub ProzFx() ' ' ProzFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word on the proz.com website (into EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.ch/#hl=en&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+site:proz.com" URL = URL & "+english" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on proz.com website (into EN). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub GoogleFx() ' ' GoogleFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in google.com ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.ch/#hl=en&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches Google for the word that you have highlighted in MS Word. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub EjpdAdminChFx() ' ' EjpdAdminChFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word on the ejpd.admin.ch multilingual website (DE-EN) ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.com/#hl=en&sclient=psy-ab&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+inurl:ejpd.admin.ch" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on ejpd.admin.ch multilingual website (DE-EN). First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub UkNewspapersFx() ' ' UkNewspapersFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word on UK newspapers ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.ch/#hl=en&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+site:guardian.co.uk OR site:timesonline.co.uk OR site:independent.co.uk OR site:telegraph.co.uk OR site:economist.com" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on UK newspapers. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub GoogleUkFx() ' ' GoogleUkFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word on UK newspaper websites ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.com/#hl=en&sclient=psy-ab&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+site:uk" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on UK newspaper websites. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub BanksFx() ' ' BanksFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word on multilingual bank websites ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.ch/#hl=en&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+site:ubs.com OR site:credit-suisse.com OR site:snb.ch" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word on multilingual bank websites. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub GoogleBooksCulinaryFx() ' ' GoogleBooksCulinaryFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in Google Books in Lonely Planet, Rough Guide and Fodor's. ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "https://www.google.ch/search?hl=en&tbm=bks&ei=o02-W5_mDcfPwAL7lqaABA&q=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "+intitle%3A%22lonely+planet%22+OR+intitle%3A%22rough+guide%22+OR+intitle%3A%22fodor%27s%22&oq=HELLO+intitle%3A%22lonely+planet%22+OR+intitle%3A%22rough+guide%22+OR+intitle%3A%22fodor%27s%22&gs_l=psy-ab.3...14990.15844.0.16685.6.6.0.0.0.0.102.425.5j1.6.0....0...1c.1.64.psy-ab..0.0.0....0.ElwYRLwp4Pw" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word in Google Books in Lonely Planet, Rough Guide and Fodor's. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub GetFromGlossary() ' ' GetFromGlossary macro ' ' On Error GoTo MainStop If Documents.Count <> 2 Then WordBasic.MsgBox "Close all Word documents and open only your Word glossary and your Word document to be translated. In your text, highlight the SOURCE LANGUAGE term that you wish to retrieve from your glossary, then click again!" Exit Sub End If Dim theTerm As String ' SL term Dim theTermLC As String ' SL term but all lower case Dim b$ ' TL term Dim c$ ' content of each cell containing the SL term Dim WordOrPhrase As Integer ' Tile the two open windows - glossary and document to be translated Windows.Arrange ' If the selection is an insertion point If Selection.Type = wdSelectionIP Then MsgBox "You need to select the SOURCE LANGUAGE TERM that you wish to retrieve from your glossary." Exit Sub End If ' If the selection is NOT an insertion point and therefore a word or phrase If Selection.Type <> wdSelectionIP Then theTerm = Selection.Text End If ' Trim theTerm to remove any spaces after it theTerm = Trim(theTerm) WordOrPhrase = Selection.Words.Count Selection.Copy ' Go to glossary Dim AnzahlFenster As Integer Dim NummerAktivesFenster As Integer AnzahlFenster = Application.Windows.Count NummerAktivesFenster = Application.ActiveWindow.Index If AnzahlFenster > NummerAktivesFenster Then Application.ActiveWindow.Next.Activate Else Application.Windows(1).Activate End If ' Go to top of document Selection.HomeKey Unit:=wdStory ' Select column to be searched, i.e. column no. 1 Selection.SelectColumn Selection.Find.ClearFormatting With Selection.Find ' Search for theTerm .Text = theTerm .Forward = True ' Stop at each term found .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With ' Find SL term in glossary Selection.Find.Execute ' If SL term not found anywhere in glossary If Selection.Find.Found = False Then ' Move down to remove highlighting of selection Selection.MoveDown Unit:=wdLine, Count:=1 ' Ask user whether he wants to enter a translation in the glossary Dim y ' Return value of dialogue box Dim glosdlg As Object: Set glosdlg = WordBasic.CurValues.UserDialog WordBasic.BeginDialog 153, 123, 411, 119, "Enter translation in glossary" WordBasic.Text 10, 6, 382, 73, "<" + theTerm$ + "> is not in your glossary. Add it now?" WordBasic.OKButton 88, 89, 88, 21 WordBasic.CancelButton 233, 89, 88, 21 WordBasic.EndDialog Set glosdlg = WordBasic.CurValues.UserDialog Set glosdlg = WordBasic.CurValues.UserDialog ' User answer y = WordBasic.Dialog.UserDialog(glosdlg, -1) ' If the user clicks the OK button then If y = -1 Then ' If the term to be added is a phrase If WordOrPhrase = 1 Then ' If the term to be added is a single word ' Add the term at the bottom of the glossary ' ADDTOGLOSSARY 1 BEGINS HERE Selection.EndKey Unit:=wdStory Selection.InsertRows 1 Selection.HomeKey Unit:=wdLine Selection.TypeText Text:=theTerm Selection.MoveRight Unit:=wdCell ' ADDTOGLOSSARY 1 ENDS HERE Else ' ADDTOGLOSSARY 1 BEGINS HERE ' Add the term at the top of the glossary Selection.HomeKey Unit:=wdStory Selection.InsertRows 1 Selection.HomeKey Unit:=wdLine Selection.TypeText Text:=theTerm Selection.MoveRight Unit:=wdCell ' ADDTOGLOSSARY 1 ENDS HERE End If Else ' DONOTHING BEGINS HERE Dim AnzahlFenster2 As Integer Dim NummerAktivesFenster2 As Integer AnzahlFenster2 = Application.Windows.Count NummerAktivesFenster2 = Application.ActiveWindow.Index If AnzahlFenster2 > NummerAktivesFenster2 Then Application.ActiveWindow.Next.Activate Else Application.Windows(1).Activate End If Selection.MoveRight Unit:=wdCharacter, Count:=1 Exit Sub ' DONOTHING ENDS HERE End If ' If term has been found in glossary, run the check loop to locate SL term on its own not as part of longer phrase Else ' First go to beginning of line Selection.HomeKey Unit:=wdLine Do ' Find term in glossary Selection.Find.ClearFormatting With Selection.Find .Text = theTerm .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute ' Copy entire cell content and call it c$ Selection.MoveUp Unit:=wdParagraph, Count:=1 Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend c$ = WordBasic.[Selection$]() ' Compare SL term with entire cell content to check whether they are the same ' to make sure our SL term is not part of a longer phrase ' Change all letters to lower case for the purpose of comparing theTerm and c$ theTermLC = LCase(theTerm) c$ = LCase(c$) If c$ = theTermLC Then ' GETFROMGLOSSARY BEGINS HERE ' Go and get translation from column no. 2 and call it b$ ' Go back to document Selection.MoveRight Unit:=wdCell b$ = WordBasic.[Selection$]() ' Ask user where he wants to replace the term Dim x ' Return value of dialogue box Dim dlg As Object: Set dlg = WordBasic.CurValues.UserDialog WordBasic.BeginDialog 153, 123, 411, 119, "Replace term" WordBasic.Text 10, 6, 382, 73, "<" + theTerm$ + "> = <" + b$ + "> Replace everywhere in text below?" WordBasic.OKButton 88, 89, 88, 21 WordBasic.CancelButton 233, 89, 88, 21 WordBasic.EndDialog Set dlg = WordBasic.CurValues.UserDialog Set dlg = WordBasic.CurValues.UserDialog ' User answer x = WordBasic.Dialog.UserDialog(dlg, -1) ' If the user clicks the OK button then If x = -1 Then ' REPLACETHISEVERYWHERE BEGINS HERE Dim AnzahlFenster1 As Integer Dim NummerAktivesFenster1 As Integer AnzahlFenster1 = Application.Windows.Count NummerAktivesFenster1 = Application.ActiveWindow.Index If AnzahlFenster1 > NummerAktivesFenster1 Then Application.ActiveWindow.Next.Activate Else Application.Windows(1).Activate End If ' Replace all Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = theTerm .Replacement.Text = b$ .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ' REPLACETHISEVERYWHERE ENDS HERE ' If the user clicks the Cancel button then Else ' DONOTHING BEGINS HERE Dim AnzahlFenster3 As Integer Dim NummerAktivesFenster3 As Integer AnzahlFenster3 = Application.Windows.Count NummerAktivesFenster3 = Application.ActiveWindow.Index If AnzahlFenster3 > NummerAktivesFenster3 Then Application.ActiveWindow.Next.Activate Else Application.Windows(1).Activate End If Selection.MoveRight Unit:=wdCharacter, Count:=1 Exit Sub ' DONOTHING ENDS HERE End If ' GETFROMGLOSSARY ENDS HERE Exit Sub End If ' Deselect cell content by pressing End key so search continues downwards Selection.EndKey Unit:=wdLine If Selection.Find.Found = False Then ' Ask user whether he wants to enter translation in glossary for term not found alone Dim z ' Return value of dialogue box Dim glossdlg As Object: Set glossdlg = WordBasic.CurValues.UserDialog WordBasic.BeginDialog 153, 123, 411, 119, "Enter translation in glossary" WordBasic.Text 10, 6, 382, 73, "<" + theTerm$ + "> is not in your glossary. Add it now?" WordBasic.OKButton 88, 89, 88, 21 WordBasic.CancelButton 233, 89, 88, 21 WordBasic.EndDialog Set glossdlg = WordBasic.CurValues.UserDialog Set glossdlg = WordBasic.CurValues.UserDialog ' User answer z = WordBasic.Dialog.UserDialog(glossdlg, -1) ' If the user clicks the OK button then If z = -1 Then ' ADDTOGLOSSARY 2 BEGINS HERE ' Search from bottom up for terms containing my term and place my term below Selection.EndKey Unit:=wdStory Selection.MoveUp Unit:=wdLine, Count:=1 ' Select column to be searched, i.e. column no. 1 Selection.SelectColumn Selection.Find.ClearFormatting With Selection.Find .Text = theTerm .Replacement.Text = "" .Forward = False .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute ' Select current cell to move down to cell below Selection.MoveUp Unit:=wdParagraph, Count:=1 Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend Selection.MoveDown Unit:=wdLine, Count:=1 Selection.HomeKey Unit:=wdLine Selection.InsertRows 1 Selection.HomeKey Unit:=wdLine Selection.TypeText Text:=theTerm Selection.MoveRight Unit:=wdCharacter, Count:=1 ' ADDTOGLOSSARY 2 ENDS HERE Exit Sub ' If the user clicks the Cancel button then Else ' DONOTHING BEGINS HERE Dim AnzahlFenster4 As Integer Dim NummerAktivesFenster4 As Integer AnzahlFenster4 = Application.Windows.Count NummerAktivesFenster4 = Application.ActiveWindow.Index If AnzahlFenster4 > NummerAktivesFenster4 Then Application.ActiveWindow.Next.Activate Else Application.Windows(1).Activate End If Selection.MoveRight Unit:=wdCharacter, Count:=1 Exit Sub ' DONOTHING ENDS HERE End If End If ' Move to cell below and highlight remainder of column no. 1 to be searched Selection.MoveUp Unit:=wdParagraph, Count:=1 Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend Selection.MoveDown Unit:=wdLine, Count:=1 Selection.EndKey Unit:=wdStory, Extend:=wdExtend Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend Loop Until Selection.Find.Found = False End If MainStop: If Err.Number <> 0 Then MsgBox "An error has occurred! (Possible cause: Glossary not open)" End If End Sub Sub ReplaceAllDown() ' ' ReplaceAllDown Makro ' This macro speeds up the process of replacing in the remainder of your ' text all instances of the source language term that you have just entered ' in your glossary with the target language term that you have just entered ' alongside it. ' On Error GoTo MainStop If Documents.Count <> 2 Then WordBasic.MsgBox "Close all Word documents and open only your Word glossary and your Word document to be translated. In your glossary, highlight the TARGET LANGUAGE term that you wish to replace in your text, then click again!" Exit Sub End If Dim A As String ' SL term Dim b As String ' TL term ' Copy entire content of TL term cell in column 2 and call it b$ Selection.MoveUp Unit:=wdParagraph, Count:=1 Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend b$ = WordBasic.[Selection$]() ' Copy entire content of SL term cell in column 1 and call it a$ Selection.HomeKey Unit:=wdLine Selection.MoveLeft Unit:=wdCell A$ = WordBasic.[Selection$]() ' REPLACETHISEVERYWHERE BEGINS HERE ' Return to document to be translated Dim AnzahlFenster1 As Integer Dim NummerAktivesFenster1 As Integer AnzahlFenster1 = Application.Windows.Count NummerAktivesFenster1 = Application.ActiveWindow.Index If AnzahlFenster1 > NummerAktivesFenster1 Then Application.ActiveWindow.Next.Activate Else Application.Windows(1).Activate End If ' Replace all a (SL term) with b (TL term) downwards in document ' First move left to begin with current term Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = A$ .Replacement.Text = b$ .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = True .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ' REPLACETHISEVERYWHERE ENDS HERE Selection.Find.ClearFormatting ' Move cursor after first replacement made With Selection.Find .Text = b$ .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = True .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Selection.MoveRight Unit:=wdCharacter, Count:=1 MainStop: If Err.Number <> 0 Then MsgBox "An error has occurred! (Possible causes: Glossary not open / You need to highlight the TL term in the glossary that you wish to replace in your document)" End If End Sub Sub AddToGlossary() ' ' AddToGlossary Macro ' ' On Error GoTo MainStop If Documents.Count <> 2 Then WordBasic.MsgBox "Close all Word documents and open only your Word glossary and your Word document to be translated. In your text, highlight the SOURCE LANGUAGE term that you wish to add to your glossary, then click again!" Exit Sub End If Dim theTerm As String ' SL term Dim theTermLC As String ' SL term all in lower case Dim c$ ' content of each cell containing the SL term Dim WordOrPhrase As Integer ' Tile the two open windows - glossary and document to be translated Dim backtodoc As Integer ' go back to document? 1=yes backtodoc = 0 Windows.Arrange ' If the selection is an insertion point If Selection.Type = wdSelectionIP Then MsgBox "You need to select the SOURCE LANGUAGE TERM that you wish to add to your glossary." Exit Sub End If ' If the selection is NOT an insertion point and therefore a word or phrase If Selection.Type <> wdSelectionIP Then ' If there is an error of any sort go to MainStop theTerm = Selection.Text End If ' Trim theTerm to remove any spaces after it theTerm = Trim(theTerm) WordOrPhrase = Selection.Words.Count Selection.Copy ' Go to glossary Dim AnzahlFenster As Integer Dim NummerAktivesFenster As Integer AnzahlFenster = Application.Windows.Count NummerAktivesFenster = Application.ActiveWindow.Index If AnzahlFenster > NummerAktivesFenster Then Application.ActiveWindow.Next.Activate Else Application.Windows(1).Activate End If ' Go to top of document Selection.HomeKey Unit:=wdStory ' Select column to be searched, i.e. column no. 1 Selection.SelectColumn ' Find SL term in glossary Selection.Find.ClearFormatting With Selection.Find ' Search for theTerm .Text = theTerm .Forward = True ' Stop at end of document .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute ' If SL term not found anywhere in glossary If Selection.Find.Found = False Then ' If the term to be added is a phrase If WordOrPhrase = 1 Then ' If the term to be added is a single word ' Add the term at the bottom of the glossary ' ADDTOGLOSSARY 1 BEGINS HERE Selection.EndKey Unit:=wdStory Selection.InsertRows 1 Selection.HomeKey Unit:=wdLine Selection.TypeText Text:=theTerm Selection.MoveRight Unit:=wdCell ' ADDTOGLOSSARY 1 ENDS HERE Else ' ADDTOGLOSSARY 1 BEGINS HERE ' Add the term at the top of the glossary Selection.HomeKey Unit:=wdStory Selection.InsertRows 1 Selection.HomeKey Unit:=wdLine Selection.TypeText Text:=theTerm Selection.MoveRight Unit:=wdCell ' ADDTOGLOSSARY 1 ENDS HERE End If ' If SL term has been found in glossary ' run the check loop to locate SL term on its own not as part of longer phrase Else ' First go to beginning of document Selection.HomeKey Unit:=wdStory ' Select column to be searched, i.e. column 1 Selection.SelectColumn Do ' Find term in glossary Selection.Find.ClearFormatting With Selection.Find .Text = theTerm .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute ' Copy entire cell content and call it c$ Selection.MoveUp Unit:=wdParagraph, Count:=1 Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend c$ = WordBasic.[Selection$]() ' Compare SL term with entire cell content to check whether they are the same ' to make sure our SL term is not part of a longer phrase ' Change all letters to lower case for the purpose of comparing theTerm and c$ theTermLC = LCase(theTerm) c$ = LCase(c$) ' If theTerm has been found on its own If c$ = theTermLC Then MsgBox "<" + theTerm$ + "> is already in your glossary." backtodoc = backtodoc + 1 GoTo ReturnToDocument End If ' Move to cell below and highlight remainder of column no. 1 to be searched Selection.MoveUp Unit:=wdParagraph, Count:=1 Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend Selection.MoveDown Unit:=wdLine, Count:=1 Selection.EndKey Unit:=wdStory, Extend:=wdExtend Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend Loop Until Selection.Find.Found = False ' ADDTOGLOSSARY 2 BEGINS HERE ' Search from bottom up for terms containing my term and place my term below Selection.EndKey Unit:=wdStory Selection.MoveUp Unit:=wdLine, Count:=1 ' Select column to be searched, i.e. column no. 1 Selection.SelectColumn Selection.Find.ClearFormatting With Selection.Find .Text = theTerm .Replacement.Text = "" .Forward = False .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute ' Select current cell to move down to cell below Selection.MoveUp Unit:=wdParagraph, Count:=1 Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend Selection.MoveDown Unit:=wdLine, Count:=1 Selection.HomeKey Unit:=wdLine Selection.InsertRows 1 Selection.HomeKey Unit:=wdLine Selection.TypeText Text:=theTerm Selection.MoveRight Unit:=wdCharacter, Count:=1 ' ADDTOGLOSSARY 2 ENDS HERE End If MainStop: If Err.Number <> 0 Then MsgBox "An error has occurred! (Possible cause: Glossary not open)" End If ReturnToDocument: ' Go back to document If backtodoc <> 0 Then Dim AnzahlFenster1 As Integer Dim NummerAktivesFenster1 As Integer AnzahlFenster1 = Application.Windows.Count NummerAktivesFenster1 = Application.ActiveWindow.Index If AnzahlFenster1 > NummerAktivesFenster1 Then Application.ActiveWindow.Next.Activate Else Application.Windows(1).Activate End If End If End Sub Sub ShowHide() ' ' ShowHide Macro ' Macro created 03.04.2003 by Tanya Harvey Ciampi ' On Error GoTo MainStop If ActiveWindow.View.ShowAll = False Or ActiveWindow.View.ShowHiddenText = False Then With ActiveWindow With .View .ShowHiddenText = True .ShowAll = True End With End With Else With ActiveWindow With .View .ShowHiddenText = False .ShowAll = False End With End With End If MainStop: If Err.Number <> 0 Then MsgBox "This macro shows and hides all hidden text, spaces, tabs, paragraph marks etc. First you need to open a document..." & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub PasteUnformatted() ' ' PasteUnformatted Macro ' Macro creata il 07/01/2005 da Tanya Harvey Ciampi ' WordBasic.EditPasteSpecial IconNumber:=0, Link:=0, DisplayIcon:=0, Class:="Word.Document.6", DataType:="Text", IconFileName:="C:\PROGRA~1\MSOFFI~1\WINWORD\WINWORD.EXE", Caption:="Microsoft Word Document" End Sub Sub ShowMarkup() ' ' ShowMarkup Makro ' ' WordBasic.ShowInsertionsAndDeletions WordBasic.ShowFormatting End Sub Sub SelectNextSentence() ' Jump thru text sentence by sentence Selection.Sentences(1).Next.Select Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend Selection.Sentences(1).Select End Sub Sub InsertQuery() ' ' InsertQuery Macro ' Macro created 01.07.02 by Tanya Harvey Ciampi ' Dim ThisDocument As String On Error GoTo MainStop ThisDocument = Application.ActiveDocument.Name If ThisDocument = "macros_for_translators.dot" Or ThisDocument = "macros_for_translators.doc" Then MsgBox "You need to install these macros first!" Exit Sub End If Dim theTerm As String If Selection.Type = wdSelectionIP Then MsgBox "You need to highlight a word or phrase first..." Exit Sub Else theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces With Selection.Font With .Shading .Texture = wdTextureNone .ForegroundPatternColor = wdColorAutomatic .BackgroundPatternColor = wdColorYellow End With .Borders(1).LineStyle = wdLineStyleNone .Borders.Shadow = False End With Selection.TypeText Text:="????" Selection.MoveLeft Unit:=wdCharacter, Count:=2 With Selection.Font With .Shading .Texture = wdTextureNone .ForegroundPatternColor = wdColorAutomatic .BackgroundPatternColor = wdColorAutomatic End With .Borders(1).LineStyle = wdLineStyleNone .Borders.Shadow = False End With Selection.TypeText Text:=theTerm Selection.MoveRight Unit:=wdCharacter, Count:=2 With Selection.Font With .Shading .Texture = wdTextureNone .ForegroundPatternColor = wdColorAutomatic .BackgroundPatternColor = wdColorAutomatic End With .Borders(1).LineStyle = wdLineStyleNone .Borders.Shadow = False End With MainStop: If Err.Number <> 0 Then MsgBox "This macro inserts question marks around a word or phrase that you have highlighted. You need to highlight a term first..." & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub AutoKorrektur() ' ' AutoKorrektur Makro ' This macro opens a window for you to enter a shortcut string for adding an entry in Word's AutoKorrektur dictionary ' Dim lngLanguage As Long lngLanguage = Selection.LanguageID 'identify the language of the Autocorrect dictionary currently in use Dim theTerm, Newline As String Newline = Chr(13) Dim theShortcut As String On Error GoTo MainStop ' If a word has been selected If Selection.Type = wdSelectionIP Then theTerm = Selection.Words(1).Text Else theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces AddNewEntry: Dim Message, Title, ShortcutString As String ' Prompt the user to enter a shortcut string Message = "Enter a shortcut string for <" + theTerm + ">!" + Newline + "The Autocorrect dictionary currently selected is " + UCase(Languages(lngLanguage)) + "." + Newline + "If this is wrong, press ESC and set the correct language first!" Title = "Create a shortcut to enter in your Autocorrect dictionary" theShortcut = InputBox(Message, Title) theShortcut = Trim(theShortcut) ' If the user clicks Cancel If theShortcut = "" Then ' Do nothing Exit Sub End If AutoCorrect.Entries.Add Name:=theShortcut, Value:=theTerm ' MsgBox "<" + theShortcut + "> to be replaced with <" + theTerm + ">." Selection.MoveRight Unit:=wdWord, Count:=1 MainStop: If Err.Number <> 0 Then MsgBox "You need to highlight the long form for which you wish to create a shortcut!" End If End Sub Sub FindInGlossaryBafu() ' ' FindInGlossaryBafu Macro ' Macro creata 2017 da Tanya ' This macro searches a glossary on your computer for the string that you have highlighted in a document that you are translating. ' Dim theTerm As String Static Glossary As Document Static NotFirstTime As Boolean ' Declare FirstTime as a true/false variable that will be remembered after the macro is launched until Word is closed OpenGlossaryAgain: ' If an error occurs If Err <> 0 Then ' Consider this the first time that the macro is being run so that the glossary can be reopened NotFirstTime = False Err = 0 End If ' Copy the term that is selected if there is a term selected If Selection.Type = wdSelectionIP Then theTerm = Selection.Words(1).Text Else theTerm = Selection.Text End If theTerm = Trim(theTerm) Static GlossaryPath As String GlossaryPath = "F:\now\de-en_DICTIONARY_BAFU.doc" ' If this macro is being run for the first time and therefore the glossary is closed If NotFirstTime = False Then ' set FirstTime to true and carry on so next time the macro is run it knows that it has been run before NotFirstTime = True ' Open the glossary Documents.Open FileName:=GlossaryPath Set Glossary = ActiveDocument ' If FirstTime is FALSE i.e. if this macro has been run before and the glossary is open Else ' if an error occurs because the macro has been run before but the glossary has since been closed, instead of activating the glossary, OPEN it again. If Err <> 0 Then ' Set Err back to 0 Err = 0 ' Open the glossary again Documents.Open FileName:=GlossaryPath End If ' Activate the glossary that is open On Error GoTo OpenGlossaryAgain Glossary.Activate ' The result of the routine above is that the glossary is now open and ready to be searched End If ' Search the glossary from the top ' Go to top of the glossary SearchGlossary: Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting With Selection.Find .Text = theTerm .Replacement.Text = "" .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute ' SendKeys "^f", True ' This opens the search window, which can slow things down, so this is optional End Sub Sub GoogleME() ' ' GoogleME macro - USES Microsoft Edge ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in google.com via Microsoft Edge ' Dim theTerm As String ' Term to look up in dictionary Dim DblQuote As String DblQuote = Chr(34) On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = DblQuote & theTerm & DblQuote ' Enclose string in double quotes ' You may need to modify the path below for your computer Newsite = Shell("C:\Windows\explorer.exe microsoft-edge:" & theTerm) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches Google for the word that you have highlighted in MS Word via Microsoft Edge. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub GoogleBooksDictsEnFx() ' ' GoogleBooksDictsEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in a dictionary in Google Books ' to find an English translation ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in the Firefox browser On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol theTerm = Replace(theTerm, "", "%C3%A4") ' Remove any with code %C3%A4 theTerm = Replace(theTerm, "", "%C3%B6") ' Remove any with code %C3%B6 theTerm = Replace(theTerm, "", "%C3%BC") ' Remove any with code %C3%BC theTerm = Replace(theTerm, "", "%C3%9F") ' Remove any with code %C3%9F theTerm = Replace(theTerm, "", "%C3%A7") ' Remove any with code %C3%A7 ' The URL to open is the following composed as follows myURL = "https://www.google.ch/search?q=" myURL = myURL & "%22" ' add opening quotation marks myURL = myURL & theTerm ' add closing quotation marks myURL = myURL & "%22" myURL = myURL & "%20intitle%3Adictionary&hl=en&rlz=1T4ADFA_itCH373CH373&um=1&ie=UTF-8&tbo=u&tbs=bks:1&source=og&sa=N&tab=wp" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word in a dictionary in Google Books. First you need to open a Word document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub TermiumFrEnFx() ' ' TermiumFrEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a word highlighted in MS Word in the Termium FR>EN term base of the Canadian government ' Dim theTerm As String ' Term to look up in dictionary Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces theTerm = Replace(theTerm, " ", "+") ' Replace any spaces with the plus symbol ' The URL to open is the following composed as follows URL = "http://www.btb.termiumplus.gc.ca/tpv2alpha/alpha-eng.html?lang=eng&i=1&srchtxt=" URL = URL & "%22" ' add opening quotation marks URL = URL & theTerm ' add closing quotation marks URL = URL & "%22" URL = URL & "&index=alt&codom2nd_wet=1" ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for the word that you have highlighted in MS Word in the Termium FR>EN term base of the Canadian government. First you need to open a document and place your cursor over the word you wish to look up... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub DeeplDeEnFx() ' ' DeeplDeEnFx macro - USES Firefox ' by Tanya Harvey Ciampi - www.multilingual.ch ' Searches for a translation of your highlighted text in Deepl.com ' Dim theTerm As String ' Text to look Dim URL As String ' The URL to open in Firefox On Error GoTo MainStop ' If nothing is selected If Selection.Type = wdSelectionIP Then ' Select the term where the cursor is located theTerm = Selection.Words(1).Text Else ' Use the current selection theTerm = Selection.Text End If theTerm = Replace(theTerm, vbCr, "") ' Remove any soft returns in the phrase that you have highlighted theTerm = Replace(theTerm, vbLf, "") ' Remove paragraph breaks in the phrase that you have highlighted theTerm = Trim(theTerm) ' Remove any spaces either side of the term theTerm = Replace(theTerm, " ", "%20") ' Replace spaces within a phrase with code the browser will understand ' The URL to open is the following composed as follows URL = "https://www.deepl.com/translator#de/en/" URL = URL & theTerm ' add closing quotation marks ' You may need to modify the path below for the Firefox.exe file for your computer Newsite = Shell("C:\Program Files\Mozilla Firefox\firefox.exe " & URL) MainStop: If Err.Number <> 0 Then MsgBox "This macro searches for a translation of your highlighted text in Deepl.com. First you need to open a Word document and highlight the text that you wish to translate... " & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub InsertComment() ' ' InsertComment Macro ' Macro created 01.07.02 by Tanya Harvey Ciampi ' Dim ThisDocument As String On Error GoTo MainStop ThisDocument = Application.ActiveDocument.Name If ThisDocument = "macros_for_translators.dot" Or ThisDocument = "macros_for_translators.doc" Then MsgBox "You need to install these macros first!" Exit Sub End If ' If text is currently highlighted If Selection.Type <> wdSelectionIP Then ' Unhighlight Selection.MoveRight Unit:=wdCharacter, Count:=1 End If Selection.TypeText Text:="{{}}" Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend With Selection.Font With .Shading .Texture = wdTextureNone .ForegroundPatternColor = wdColorAutomatic .BackgroundPatternColor = wdColorYellow End With .Borders(1).LineStyle = wdLineStyleNone .Borders.Shadow = False End With With Options .DefaultBorderLineStyle = wdLineStyleSingle .DefaultBorderLineWidth = wdLineWidth050pt .DefaultBorderColor = wdColorAutomatic End With Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.MoveLeft Unit:=wdCharacter, Count:=2 MainStop: If Err.Number <> 0 Then MsgBox "This macro inserts a comment or query at the location of your cursor. You need to place your cursor in the right location of your text first..." & vbCr & "" & vbCr & "For assistance with these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi." End If End Sub Sub UKSpelling() ' ' UKSpelling Macro ' Macro registrata il 06/06/2004 da PIPPO ' Selection.HomeKey Unit:=wdStory Selection.WholeStory ActiveDocument.AttachedTemplate.LanguageID = wdEnglishUK Selection.LanguageID = wdEnglishUK Application.CheckLanguage = True If Options.CheckGrammarWithSpelling = True Then ActiveDocument.CheckGrammar Else ActiveDocument.CheckSpelling End If End Sub Sub ItSpelling() ' ' ItSpelling Macro ' Macro registrata il 06/06/2004 da PIPPO ' Selection.HomeKey Unit:=wdStory Selection.WholeStory ActiveDocument.AttachedTemplate.LanguageID = wdItalian Selection.LanguageID = wdItalian Application.CheckLanguage = True If Options.CheckGrammarWithSpelling = True Then ActiveDocument.CheckGrammar Else ActiveDocument.CheckSpelling End If End Sub