www.multilingual.ch - English translations & proofreading - WWW Search Interfaces for Translators
Word macro for searching Google

 


The macros below work in MS Word 2002 at least

 

Once you have installed the macro below, you will need to add a macro button in your toolbar or in your right-click menu to run the macro.

 

Macro for searching for words and phrases in Google

Macro for searching Google for glossaries containing specific words or phrases (English)

Macro for searching Google for glossaries containing specific words or phrases (Italian)

Macro for searching Google for glossaries containing specific words or phrases (German)

Macro for searching Google for glossaries containing specific words or phrases (French)

 

 

 

Macro for searching for words and phrases in Google

What the macro does

This macro will search Google for any word or phrase that you highlight in Word. This can be useful if you regularly need to check whether a certain word or phrase exists.

How to set up the macro

1. Select and copy the text of the macro shown below: Copy only the material that appears between the lines of asterisks; DO NOT copy extra blank lines or the asterisks themselves.

Copy the correct code:
CODE 1 is for English, Italian and perhaps other versions of Internet Explorer;
CODE 2 is for German versions.

********** BEGINNING OF CODE 1: cut here (do not include this line) **********

'
' SearchGoogle Macro
' Macro created 01.07.02 by Tanya Harvey Ciampi
'
On Error GoTo Mainstop
Dim TheTerm As String
If Selection.Type = wdSelectionIP Then
TheTerm = Selection.Words(1).Text
Else
TheTerm = Selection.Text
End If
TheTerm = Trim(TheTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&as_epq="
SendKeys TheTerm & "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&as_epq="
SendKeys TheTerm & "{Enter}", True
End If
Mainstop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for the word or phrase that you have highlighted in Word. First you need to highlight a term..." & vbCr & "" & vbCr & "For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 1: cut here (do not include this line) **********

 

********** BEGINNING OF CODE 2: cut here (do not include this line) **********

'
' SearchGoogle Macro
' Macro created 01.07.02 by Tanya Harvey Ciampi
'
On Error GoTo Mainstop
Dim TheTerm As String
If Selection.Type = wdSelectionIP Then
TheTerm = Selection.Words(1).Text
Else
TheTerm = Selection.Text
End If
TheTerm = Trim(TheTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.google.com/search?num=20&hl=en&as_epq="
SendKeys TheTerm & "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%s", True
SendKeys "http://www.google.com/search?num=20&hl=en&as_epq="
SendKeys TheTerm & "{Enter}", True
End If
Mainstop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for the word or phrase that you have highlighted in Word. First you need to highlight a term..." & vbCr & "" & vbCr & "For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 2: cut here (do not include this line) **********

 

2. In the menu bar at the top of your window in Word, click on the Tools menu. Click on Macro, then on Macros in the sub-menu.

3. The Macros dialog box will open. Type the name "Google" for the macro in the "Macro name:" field.

4. Click the Create button.

5. A window titled "Microsoft Visual Basic – Normal – [New Macros (Code)]" will open. In the window that appears, find the line of text that reads: Macro created [Today’s Date] by [Your Name]

6. Paste the macro lines that you copied in Step 1 into the Visual Basic window, at the spot where the input cursor is blinking.

7. Save your macro by clicking the Save button (diskette icon) on the toolbar.

8. Close the whole Visual Basic window. Your macro is now installed.

9. Add a macro button in your toolbar (if you want to use this image: , right-click it and save it to your harddrive first. Open it in Paintbrush, select it, copy it then paste it into your toolbar in Word as described...) or in your right-click menu to run the macro.

 

How to run the macro

Highlight a word or phrase in Word, click on the macro button in your toolbar or select the macro from your right-click menu.

 

Macro for searching Google for glossaries containing specific words or phrases (English)

What the macro does

This macro will search Google for glossaries containing any English word or phrase that you highlight in Word. This can be useful if you regularly need to check the meaning of terms that you have in an MS Word document.

How to set up the macro

1. Select and copy the text of the macro shown below: Copy only the material that appears between the lines of asterisks; DO NOT copy extra blank lines or the asterisks themselves.

Copy the correct code:
CODE 1 is for English, Italian and perhaps other versions of Internet Explorer;
CODE 2 is for German versions.

********** BEGINNING OF CODE 1: cut here (do not include this line) **********

'
' GoogleGlosEn Macro
' Macro created 21.6.2003 by Tanya Harvey Ciampi
'
On Error GoTo MainStop
Dim theTerm As String
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dictionary OR intitle:glossary OR intitle:lexicon", True
SendKeys "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dictionary OR intitle:glossary OR intitle:lexicon", True
SendKeys "{Enter}", True
End If
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for a glossary containing the English word or phrase of up to 4 words that you have highlighted in Word. First you need to highlight a term... For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 1: cut here (do not include this line) **********

 

********** BEGINNING OF CODE 2: cut here (do not include this line) **********

'
' GoogleGlosEn1 Macro
' Macro created 21.6.2003 by Tanya Harvey Ciampi
'
On Error GoTo MainStop
Dim theTerm As String
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dictionary OR intitle:glossary OR intitle:lexicon", True
SendKeys "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%s", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dictionary OR intitle:glossary OR intitle:lexicon", True
SendKeys "{Enter}", True
End If
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for a glossary containing the English word or phrase of up to 4 words that you have highlighted in Word. First you need to highlight a term... For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 2: cut here (do not include this line) **********

 

2. In the menu bar at the top of your window in Word, click on the Tools menu. Click on Macro, then on Macros in the sub-menu.

3. The Macros dialog box will open. Type the name "GoogleGlosEn" (code 1)/"GoogleGlosEn1" (code 2)" for the macro in the "Macro name:" field.

4. Click the Create button.

5. A window titled "Microsoft Visual Basic – Normal – [New Macros (Code)]" will open. In the window that appears, find the line of text that reads: Macro created [Today’s Date] by [Your Name]

6. Paste the macro lines that you copied in Step 1 into the Visual Basic window, at the spot where the input cursor is blinking.

7. Save your macro by clicking the Save button (diskette icon) on the toolbar.

8. Close the whole Visual Basic window. Your macro is now installed.

9. Add a macro button in your toolbar or in your right-click menu to run the macro.

 

How to run the macro

Highlight an English word or phrase in Word for which you need a definition, click on the macro button in your toolbar or select the macro from your right-click menu.

 

Macro for searching Google for glossaries containing specific words or phrases (Italian)

 

What the macro does

This macro will search Google for glossaries containing any Italian word or phrase that you highlight in Word. This can be useful if you regularly need to check the meaning of terms that you have in an MS Word document.

How to set up the macro

1. Select and copy the text of the macro shown below: Copy only the material that appears between the lines of asterisks; DO NOT copy extra blank lines or the asterisks themselves.

Copy the correct code:
CODE 1
is for English, Italian and perhaps other versions of Internet Explorer;
CODE 2 is for German versions.

********** BEGINNING OF CODE 1: cut here (do not include this line) **********

'
' GoogleGlosIt Macro
' Macro created 21.6.2003 by Tanya Harvey Ciampi
'
On Error GoTo MainStop
Dim theTerm As String
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dizionario OR intitle:glossario OR intitle:lessico", True
SendKeys "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dizionario OR intitle:glossario OR intitle:lessico", True
SendKeys "{Enter}", True
End If
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for a glossary containing the Italian word or phrase of up to 4 words that you have highlighted in Word. First you need to highlight a term... For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 1: cut here (do not include this line) **********

 

********** BEGINNING OF CODE 2: cut here (do not include this line) **********

'
' GoogleGlosIt1 Macro
' Macro created 21.6.2003 by Tanya Harvey Ciampi
'
On Error GoTo MainStop
Dim theTerm As String
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dizionario OR intitle:glossario OR intitle:lessico", True
SendKeys "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%s", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dizionario OR intitle:glossario OR intitle:lessico", True
SendKeys "{Enter}", True
End If
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for a glossary containing the Italian word or phrase of up to 4 words that you have highlighted in Word. First you need to highlight a term... For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 2: cut here (do not include this line) **********

 

2. In the menu bar at the top of your window in Word, click on the Tools menu. Click on Macro, then on Macros in the sub-menu.

3. The Macros dialog box will open. Type the name "GoogleGlosIt" (code 1)/"GoogleGlosIt1" (code 2)" for the macro in the "Macro name:" field.

4. Click the Create button.

5. A window titled "Microsoft Visual Basic – Normal – [New Macros (Code)]" will open. In the window that appears, find the line of text that reads: Macro created [Today’s Date] by [Your Name]

6. Paste the macro lines that you copied in Step 1 into the Visual Basic window, at the spot where the input cursor is blinking.

7. Save your macro by clicking the Save button (diskette icon) on the toolbar.

8. Close the whole Visual Basic window. Your macro is now installed.

9. Add a macro button in your toolbar or in your right-click menu to run the macro.

 

How to run the macro

Highlight an Italian word or phrase in Word for which you need a definition, click on the macro button in your toolbar or select the macro from your right-click menu.

 

Macro for searching Google for glossaries containing specific words or phrases (German)

What the macro does

This macro will search Google for glossaries containing any German word or phrase that you highlight in Word. This can be useful if you regularly need to check the meaning of terms that you have in an MS Word document.

How to set up the macro

1. Select and copy the text of the macro shown below: Copy only the material that appears between the lines of asterisks; DO NOT copy extra blank lines or the asterisks themselves.

Copy the correct code:
CODE 1
is for English, Italian and perhaps other versions of Internet Explorer;
CODE 2 is for German versions.

********** BEGINNING OF CODE 1: cut here (do not include this line) **********

'
' GoogleGlosDe Macro
' Macro created 21.6.2003 by Tanya Harvey Ciampi
'
On Error GoTo MainStop
Dim theTerm As String
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:lexikon OR intitle:glossar OR intitle:wörterbuch", True
SendKeys "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:lexikon OR intitle:glossar OR intitle:wörterbuch", True
SendKeys "{Enter}", True
End If
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for a glossary containing the German word or phrase of up to 4 words that you have highlighted in Word. First you need to highlight a term... For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 1: cut here (do not include this line) **********

 

********** BEGINNING OF CODE 2: cut here (do not include this line) **********

'
' GoogleGlosDe1 Macro
' Macro created 21.6.2003 by Tanya Harvey Ciampi
'
On Error GoTo MainStop
Dim theTerm As String
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:lexikon OR intitle:glossar OR intitle:wörterbuch", True
SendKeys "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%
s", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:lexikon OR intitle:glossar OR intitle:wörterbuch", True
SendKeys "{Enter}", True
End If
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for a glossary containing the German word or phrase of up to 4 words that you have highlighted in Word. First you need to highlight a term... For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 2: cut here (do not include this line) **********

 

2. In the menu bar at the top of your window in Word, click on the Tools menu. Click on Macro, then on Macros in the sub-menu.

3. The Macro dialog box will open. Type the name "GoogleGlosDe" (code 1)/"GoogleGlosDe1" (code 2)" for the macro in the "Macro name:" field.

4. Click the Create button.

5. A window titled "Microsoft Visual Basic" will open. In the window that appears, find the line of text that reads: Macro created [Today’s Date] by [Your Name]

6. Paste the macro lines that you copied in Step 1 into the Visual Basic window, at the spot where the input cursor is blinking (just before End Sub).

7. Save your macro by clicking the Save button (diskette icon) on the toolbar.

8. Close the whole Visual Basic window. Your macro is now installed.

9. Add a macro button in your toolbar or in your right-click menu to run the macro.

 

How to run the macro

Highlight a German word or phrase in Word for which you need a definition, click on the macro button in your toolbar or select the macro from your right-click menu.

 

Macro for searching Google for glossaries containing specific words or phrases (French)

What the macro does

This macro will search Google for glossaries containing any French word or phrase that you highlight in Word. This can be useful if you regularly need to check the meaning of terms that you have in an MS Word document.

How to set up the macro

1. Select and copy the text of the macro shown below: Copy only the material that appears between the lines of asterisks; DO NOT copy extra blank lines or the asterisks themselves.

Copy the correct code:
CODE 1
is for English, Italian and perhaps other versions of Internet Explorer;
CODE 2 is for German versions.

********** BEGINNING OF CODE 1: cut here (do not include this line) **********

'
' GoogleGlosFr Macro
' Macro created 21.6.2003 by Tanya Harvey Ciampi
'
On Error GoTo MainStop
Dim theTerm As String
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dictionnaire OR intitle:glossaire OR intitle:lexique", True
SendKeys "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%d", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dictionnaire OR intitle:glossaire OR intitle:lexique", True
SendKeys "{Enter}", True
End If
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for a glossary containing the French word or phrase of up to 4 words that you have highlighted in Word. First you need to highlight a term... For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 1: cut here (do not include this line) **********

 

********** BEGINNING OF CODE 2: cut here (do not include this line) **********

'
' GoogleGlosFr1 Macro
' Macro created 21.6.2003 by Tanya Harvey Ciampi
'
On Error GoTo MainStop
Dim theTerm As String
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Google Search") = True Then
With Tasks("Google Search")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dictionnaire OR intitle:glossaire OR intitle:lexique", True
SendKeys "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%s", True
SendKeys "http://www.google.com/search?num=20&hl=en&q=", True
SendKeys "{%}22", True
SendKeys theTerm, True
SendKeys "{%}22", True
SendKeys "&q=intitle:dictionnaire OR intitle:glossaire OR intitle:lexique", True
SendKeys "{Enter}", True
End If
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches Google for a glossary containing the French word or phrase of up to 4 words that you have highlighted in Word. First you need to highlight a term... For an updated version of these macros, visit WWW.MULTILINGUAL.CH or contact Tanya Harvey Ciampi."
End If

********** END OF CODE 2: cut here (do not include this line) **********

 

2. In the menu bar at the top of your window in Word, click on the Tools menu. Click on Macro, then on Macros in the sub-menu.

3. The Macros dialog box will open. Type the name "GoogleGlosFr" (code 1)/"GoogleGlosFr1" (code 2)" for the macro in the "Macro name:" field.

4. Click the Create button.

5. A window titled "Microsoft Visual Basic – Normal – [New Macros (Code)]" will open. In the window that appears, find the line of text that reads: Macro created [Today’s Date] by [Your Name]

6. Paste the macro lines that you copied in Step 1 into the Visual Basic window, at the spot where the input cursor is blinking.

7. Save your macro by clicking the Save button (diskette icon) on the toolbar.

8. Close the whole Visual Basic window. Your macro is now installed.

9. Add a macro button in your toolbar or in your right-click menu to run the macro.

 

How to run the macro

Highlight a French word or phrase in Word for which you need a definition, click on the macro button in your toolbar or select the macro from your right-click menu.

 

 

 

Print this page!

 

Back / Tools for Translators / Home / Site Map

http://www.multilingual.ch
Web design by Tanya Harvey Ciampi