www.multilingual.ch - English translations & proofreading - WWW Search Interfaces for Translators
Dictionary look-up macros for translators

 

 

From time to time these macros stop working due to changes in Word/Explorer, so please contact me directly for assistance!

The macros below work in MS Word 2002 and are designed for Microsoft Internet Explorer
 

NEED HELP INSTALLING THESE MACROS?

Dictionary look-up macros for CD-ROM dictionaries:

Macro for New Shorter Oxford English Dictionary (EN>EN)
Macro for Oxford SuperLex for Windows Dictionary (DE<>EN)
Dictionary look-up macro for other dictionaries

Dictionary look-up macros for free online dictionaries:

Dictionary look-up macro for IT>EN Wordreference dictionary
Dictionary look-up macro for EN>IT Wordreference dictionary
Dictionary look-up macro for DE>EN Wordreference dictionary
Dictionary look-up macro for EN>DE Wordreference dictionary
Dictionary look-up macro for EN>FR Wordreference dictionary
Dictionary look-up macro for EN>EN Wordreference dictionary

Dictionary look-up macro for DE<>MANY PONS dictionary

Many more dictionary look-up macros may be downloaded here:
ms_word_macros_for_translators.htm
Here you can download "macros_for_translators.dot", which contains a series of useful macros for translators, which are updated on a regular basis.

 

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

 

 

Dictionary look-up macros for CD-ROM dictionaries:

 

Macro for New Shorter Oxford English Dictionary (EN>EN)

What the macro does

This macro saves you a lot of switching from programme to programme and typing (or cutting & pasting). All you have to do is highlight the word that you wish to look up in your dictionary and then run the macro: your term will be searched for automatically in your dictionary.

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.

********** cut here (do not include this line) **********

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("New Shorter Oxford English Dictionary") = True Then
With Tasks("New Shorter Oxford English Dictionary")
.Visible = True
.Activate
End With
SendKeys "^{F4}{End}+{Home}{Delete}", True
SendKeys theTerm & "{ENTER}", True
Else
MsgBox "New Shorter Oxford English Dictionary is not currently running."
End If

**********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 "Search_NSOED" 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.

 

NOTE:
For this particular dictionary, the sequence of keys required to run a search is:
Ctrl-F4 / Type search term / Enter
whereby, "Ctrl-F4" becomes "^{F4}".
(Ctrl-F4 is required to close the window of a term previously searched for; then the previous term has to be deleted from the search box before a new search may begin...)

 

How to run the macro

1. First you will need to open the dictionary that you wish to search.

2. In MS Word, highlight the word that you wish to search for then select the dictionary look-up macro either from the button in your toolbar or from your right-click menu.

 

 

Macro for Oxford SuperLex for Windows Dictionary (DE<>EN)

What the macro does

This macro saves you a lot of switching from programme to programme and typing (or cutting & pasting). All you have to do is highlight the word that you wish to look up in your dictionary and then run the macro: your term will be searched for automatically in your dictionary.

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.

********** cut here (do not include this line) **********

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("Oxford SuperLex") = True Then
With Tasks("Oxford SuperLex")
.Visible = True
.Activate
End With
SendKeys "%(t)", True
SendKeys theTerm & "{ENTER}", True
Else
MsgBox "Oxford SuperLex is not currently running."
End If

**********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 "Search_Superlex" 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.

 

NOTE:
For this particular dictionary, the sequence of keys required to run a search is:
Alt-T / Type search term / Enter
whereby, "Alt-T" becomes "%(t)"

 

How to run the macro

1. First you will need to open the dictionary that you wish to search.

2. Open the book that you wish to use (e.g. German to English).

3. In MS Word, highlight the word that you wish to search for then select the dictionary look-up macro either from the button in your toolbar or from your right-click menu.

 

 

Dictionary look-up macro for other dictionaries

The macro used in the two examples above can be modified to work with other dictionaries. To set up the dictionary lookup macro for a different dictionary, open your dictionary program, then note the exact sequence of keystrokes required to perform a word search (including those needed to clear the previous search if necessary). Then make the necessary changes to the text marked in blue (SendKeys "...") in the macro code above, following these rules:

A, B, C etc => a, b, c etc   F1 etc => {F1} etc
Enter => {Enter}   End => {End}
Escape => {Escape}   Tabulator => {Tab}
Alt => %   Shift => +
Ctrl => ^   Up => {Up}
Down => {Down}   PageUp => {PgUp}
PageDown => {PgDn]   Home => {Home}

The text in red referring to the name of the program (in various locations in the macro) must match the text (or part thereof) that appears in the bar at the top of your dictionary program. If in doubt, you can open your dictionary, then press CTRL-ALT-DELETE once and then click on Task Manager to view the name of the program.

 

 

Dictionary look-up macros for free online dictionaries:

 

Dictionary look-up macro for IT>EN Wordreference dictionary

What the macro does

This macro spares you the tedious task of copying a word to the clipboard, going to www.wordreference.com, pasting the word into the search box and launching the search.

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) **********

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("English Translation") = True Then
With Tasks("English Translation")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/it/en/translation.asp?iten="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/it/en/translation.asp?iten="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the IT>EN dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

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

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("English Translation") = True Then
With Tasks("English Translation")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/it/en/translation.asp?iten="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/it/en/translation.asp?iten="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the IT>EN dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

NOTE: The long message after "MsgBox" in the Microsoft Visual Basic editor may break up onto two lines. If this happens, make it fit on one 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 "WordrefItEn" 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

1. In MS Word, highlight the word that you wish to search for, then select the dictionary look-up macro either from the button in your toolbar or from your right-click menu.

 

Dictionary look-up macro for EN>IT Wordreference dictionary

What the macro does

This macro spares you the tedious task of copying a word to the clipboard, going to www.wordreference.com, pasting the word into the search box and launching the search.

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) **********

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Italian Translation") = True Then
With Tasks("Italian Translation")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/it/translation.asp?enit="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/it/translation.asp?enit="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the EN>IT dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

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

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("Italian Translation") = True Then
With Tasks("Italian Translation")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/it/translation.asp?enit="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/it/translation.asp?enit="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the EN>IT dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

NOTE: The long message after "MsgBox" in the Microsoft Visual Basic editor may break up onto two lines. If this happens, make it fit on one 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 "WordrefEnIt" 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

1. In MS Word, highlight the word that you wish to search for, then select the dictionary look-up macro either from the button in your toolbar or from your right-click menu.

 

Dictionary look-up macro for DE>EN Wordreference dictionary

What the macro does

This macro spares you the tedious task of copying a word to the clipboard, going to www.wordreference.com, pasting the word into the search box and launching the search.

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) **********

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("German to English Translation") = True Then
With Tasks("German to English Translation")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/de/en/translation.asp?deen="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/de/en/translation.asp?deen="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the DE>EN dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

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

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("German to English Translation") = True Then
With Tasks("German to English Translation")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/de/en/translation.asp?deen="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/de/en/translation.asp?deen="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the DE>EN dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

NOTE: The long message after "MsgBox" in the Microsoft Visual Basic editor may break up onto two lines. If this happens, make it fit on one 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 "WordrefDeEn" 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

1. In MS Word, highlight the word that you wish to search for, then select the dictionary look-up macro either from the button in your toolbar or from your right-click menu.

 

Dictionary look-up macro for EN>DE Wordreference dictionary

What the macro does

This macro spares you the tedious task of copying a word to the clipboard, going to www.wordreference.com, pasting the word into the search box and launching the search.

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) **********

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("German Translation") = True Then
With Tasks("German Translation")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/de/translation.asp?ende="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/de/translation.asp?ende="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the EN>DE dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

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

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("German Translation") = True Then
With Tasks("German Translation")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/de/translation.asp?ende="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/de/translation.asp?ende="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the EN>DE dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

NOTE: The long message after "MsgBox" in the Microsoft Visual Basic editor may break up onto two lines. If this happens, make it fit on one 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 "WordrefEnDe" 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

1. In MS Word, highlight the word that you wish to search for, then select the dictionary look-up macro either from the button in your toolbar or from your right-click menu.

 

Dictionary look-up macro for EN>FR Wordreference dictionary

What the macro does

This macro spares you the tedious task of copying a word to the clipboard, going to www.wordreference.com, pasting the word into the search box and launching the search.

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) **********

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("French Translation") = True Then
With Tasks("French Translation")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/fr/translation.asp?enfr="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/fr/translation.asp?enfr="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the EN>FR dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

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

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("French Translation") = True Then
With Tasks("French Translation")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/fr/translation.asp?enfr="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/fr/translation.asp?enfr="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the EN>FR dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

NOTE: The long message after "MsgBox" in the Microsoft Visual Basic editor may break up onto two lines. If this happens, make it fit on one 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 "WordrefEnFr" 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

1. In MS Word, highlight the word that you wish to search for, then select the dictionary look-up macro either from the button in your toolbar or from your right-click menu.

 

Dictionary look-up macro for EN>EN Wordreference dictionary

What the macro does

This macro spares you the tedious task of copying a word to the clipboard, going to www.wordreference.com, pasting the word into the search box and launching the search.

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) **********

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("English Definition") = True Then
With Tasks("English Definition")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/english/definition.asp?en="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%d", True
SendKeys "http://www.wordreference.com/english/definition.asp?en="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the EN>EN dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

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

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("English Definition") = True Then
With Tasks("English Definition")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/english/definition.asp?en="
SendKeys theTerm & "{Enter}", True
Else
Set ieApp = CreateObject("InternetExplorer.Application")
With ieApp
.Height = 600
.Width = 650
.Visible = True
End With
SendKeys "%s", True
SendKeys "http://www.wordreference.com/english/definition.asp?en="
SendKeys theTerm & "{Enter}", True
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the EN>EN dictionary at WWW.WORDREFERENCE.COM for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

NOTE: The long message after "MsgBox" in the Microsoft Visual Basic editor may break up onto two lines. If this happens, make it fit on one 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 "WordrefEnEn" 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

1. In MS Word, highlight the word that you wish to search for, then select the dictionary look-up macro either from the button in your toolbar or from your right-click menu.

 

Dictionary look-up macro for DE<>MANY PONS dictionary

What the macro does

This macro spares you the tedious task of copying a word to the clipboard, going to www.wordreference.com, pasting the word into the search box and launching the search.

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) **********

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("PONSline") = True Then
With Tasks("PONSline")
.Visible = True
.Activate
End With
SendKeys "%d", True
SendKeys "http://www.vokabeltrainer.pons.de/cgi-bin/wb/wb.pl"
SendKeys "{Enter}", True
SendKeys "%d{Enter}", True
SendKeys "+{End}", True
SendKeys theTerm & "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%d", True
SendKeys "http://www.vokabeltrainer.pons.de/cgi-bin/wb/wb.pl"
SendKeys "{Enter}", True
MsgBox "Opening Internet Explorer... Wait a couple of seconds then try again! You will need to select the correct language combination and then click on *los*! Leave the Pons dictionary page open after each search."
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the dictionary at WWW.PONS.DE for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

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

Dim theTerm As String
On Error GoTo MainStop
If Selection.Type = wdSelectionIP Then
theTerm = Selection.Words(1).Text
Else
theTerm = Selection.Text
End If
theTerm = Trim(theTerm)
If Tasks.Exists("PONSline") = True Then
With Tasks("PONSline")
.Visible = True
.Activate
End With
SendKeys "%s", True
SendKeys "http://www.vokabeltrainer.pons.de/cgi-bin/wb/wb.pl"
SendKeys "{Enter}", True
SendKeys "%s{Enter}", True
SendKeys "+{End}", True
SendKeys theTerm & "{Enter}", True
Else
SendKeys "^{F12}%3", True
SendKeys "%s", True
SendKeys "http://www.vokabeltrainer.pons.de/cgi-bin/wb/wb.pl"
SendKeys "{Enter}", True
MsgBox "Opening Internet Explorer... Wait a couple of seconds then try again! You will need to select the correct language combination and then click on *los*! Leave the Pons dictionary page open after each search."
MainStop:
If Err.Number <> 0 Then
MsgBox "This macro searches the dictionary at WWW.PONS.DE for a word that you have highlighted. You need to highlight a term first..."
End If
End If

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

 

NOTE: The long message after "MsgBox" in the Microsoft Visual Basic editor may break up onto two lines. If this happens, make it fit on one 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 "Pons" 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

1. In MS Word, highlight the word that you wish to search for, then select the dictionary look-up macro either from the button in your toolbar or from your right-click menu.

 

 

 

 

 

 

Keywords: dictionary lookup macro, dictionary lookup macros, dictionary search macro, dictionary search macros, dictionary macro, dictionary macros, macro for searching dictionary, macros for searching dictionary, macros for translators, translator macro, translator macros

 

Print this page!

 

Back / Tools for Translators / Home / Site Map

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