Microsoft Word Macros for Translators (for Windows 2002 and

advertisement
Microsoft Word Macros for Translators
(for Windows 2002/Internet Explorer 6 and possibly other versions, too)
written by Tanya Harvey Ciampi, www.multilingual.ch
You are advised to read this document before installing the macro toolbars.
CAUTION: The macros below are supplied AS IS. The author of these macros will not be responsible
for any loss or damage caused by the use of these macros.
IMPORTANT: For this macro to work, you need to set your security level in Word to Medium
(recommended) or Low first. To do so, in Word select Tools/Macros/Security and under Security
Level select Medium or Low. Close down Word. When you open this document (from within Word,
with File/Open ...) you will be asked whether you wish to enable the macros in the document: Reply
Yes.
For more tips in case of problems go to:
http://support.microsoft.com/default.aspx?scid=kb;en-us/302632
(or search the English-language knowledge base at http://support.microsoft.com/default.aspx? for the number “302632”)
When you download this file to your hard disk, MAKE SURE that you call it
“macros_for_translators.dot”. The “.dot” suffix indicates a template.
This document contains the following three toolbars:
Translator macros (contains general macros for translators)
Translator macros – Dictionaries (contains dictionary look-up macros)
Translator macros – Parallel Texts (contains parallel text look-up macros)
These toolbars contain the following macros for translators:
ShowHide: This macro shows/hides all hidden text and all space, tab, paragraph marks etc. It can be
useful for when you need to spellcheck a text that you have translated using a translation memory
program (so that the spellchecker skips the source text (thus avoiding endless “spelling mistakes”) and
only checks the target text).
QuoteTransProof: This macro calculates the total number of characters including spaces in the MS
Word document that you need to translate or proofread and works out the cost of translating or
proofreading the text and the time required based on your own personal output. The character count
covers normal text, text boxes, footnotes, endnotes, headers and footers and various other sections of a
Word document that MS Word’s own character count ignores. A detailed list of the number of characters
in all the different sections is provided.
You may choose to print the key statistics to a new file. If you run the macro on several files, selecting
the “Print document statistics” option every time, the key statistics for these documents will be listed in a
single file, which you can then send to your client as a detailed quote.
PdfCharCount: This macro works with Adobe Acrobat Reader 4.0 (and possibly other versions). It
calculates the total number of characters including spaces in the Adobe Acrobat Reader file (pdf file) that
you need to translate or proofread and works out the cost of translating or proofreading the text and the
time required based on your own personal output. In addition it copies the content of the pdf file to an
MS Word document to facilitate editing if you do not have the Adobe Acrobat editor. NOTE: This macro
only works on the “text” in pdf files and does not work if the text is not “text” as such but an “image”.
InsertComment: This macro inserts “{{}}” at the location of the cursor for you to enter a comment or
query. This is useful for marking points that you need to query with the author or terms that you feel you
need to return to later on in the translation process.
InsertQuery: This macro inserts “??” around the term or phrase that you have highlighted. This is
useful for marking terms that you need to check later.
SelectUpToNextWord: This macro selects text from where the cursor is to the first occurrence of a
term of your choice. The macro may be run several times in succession to extend the selection to the
next occurrence of the word or to a different word.
DeleteToPeriod: This macro can be useful if, when you translate, you leave the source text visible
for a while until you are certain you have translated all parts of the sentence. This macro deletes all the
text (e.g. the source text) right up to the next full stop (.).
TermManage: This macro helps you manage your terminology while you translate (retrieving existing
terms from your glossary and adding new ones to it) by automating repetitive tasks.
How it works:
1. Highlight a term (word or phrase) in the MS Word document that you are translating.
2. Click on the TermManage macro button.
3. You must create a new glossary the first time; after that you may open an existing glossary.
NOTE: The glossary format must be observed (i.e. no text or spaces added before or after the
table); column 1 = source language terms, column 2 = target language terms; you may add
definitions and remarks in column 3.
4. If the term that you have highlighted is in your glossary, it will be retrieved and you may replace
all instances in the text that you are translating from the cursor point down.
5. If the term is not in your glossary you may add it and then replace all instances in the text that
you are translating from the cursor point down.
The TermManage macro may be called using the keyboard short-cut CTRL-G (if this doesn’t work
automatically, proceed as follows: In Word, select Tools/Customize and under Commands, click on the Keyboard button. On the
left, under Categories, select Macros; on the right, under Macros, select “Project.TranslatorMacros.TermManage” (the full name
might not be visible). Click in the box under New Combination, press CTRL-G and click on Assign. Close the window. If Word
prompts you to save any changes when you close down Word, reply Yes.)
TranslateFromGlossary: This macro searches the document that you need to translate for any
source language (SL) terms that are in your glossary and replaces theme with the corresponding target
language (TL) terms. Both the document to translate and the glossary must be MS Word documents;
your glossary must have a specific format (table of at least two columns, with SL terms in column 1 and
TL terms in column 2, no additional text or spaces before or after the table; you may have a column 3 for
definitions, etc.).
To run the macro: Open the document to translate and your glossary and then click on the macro icon.
Run this macro once, at the beginning of the translation, then use the TermManage macro to add new
terms.
OpenMultilingual: This macro opens the WWW Search Interfaces for Translators at
www.multilingual.ch/search_interfaces.htm
SearchGoogle: This macro searches Google for a word or phrase that you have highlighted in Word.
You can use this macro to double-check expressions that you have used in your translation.
WWW Search Interfaces for Translators
Glossary search interfaces:
GoogleGlosEn: This macro searches Google for a glossary containing the English word or phrase of
up to 4 words that you have highlighted in Word.
It is also available in the following languages:
German /
French /
Italian /
Spanish /
Portuguese
Parallel text search interfaces:
AvPtItEn: This macro searches Altavista for a page containing the term that you have highlighted in
Word, specifically a page that suggests the existence of a translation of that same page in your target
language (parallel texts). AvPtItEn finds a page containing your Italian term for which there is likely to be
an English version, too.
This macro is also available in the following language combinations:
English-Italian /
German-English /
English-German /
German-French /
French-German /
French-English /
English-French /
German-Italian /
Italian-German /
Italian-French (more
available upon request! Contact Tanya Harvey Ciampi)
Dictionary look-up macros
d-e WordrefDeEn: This macro searches for your word in the German-English dictionary at
www.wordreference.com.
It is also available for the following language combinations: English-German / French-English /
English-French / Italian-English / English-Italian
e WordrefEn: This macro searches for your word in the English dictionary at
www.wordreference.com.
i-e SapereItEn: This macro searches for your word in the Italian-English dictionary at
http://www.sapere.it/gr/DictionarySearchServlet?DS_action=Init.
It is also available for the following language combinations: English-Italian / Italian-German / GermanItalian / Italian-French / French-Italian / Italian-Spanish
d-e Pons: This macro searches for your word in the German-English dictionary at www.pons.de.
It is also available for the following language combinations: English-German / German-French /
French-German / German-Italian / Italian-German / German-Spanish / Spanish-German
OaldEn: This macro searches for your word in the Oxford Advanced Learner’s Dictionary of English
at http://www1.oup.co.uk.
MerriamWebsterEn: This macro searches for your word in the Merriam Webster English dictionary
at http://www.m-w.com.
WahrigDe: This macro searches for your word in the German dictionary at http://www.wissen.de.
GarzantiIt: This macro searches for your word in the Garzanti Italian dictionary at
http://www.garzantilinguistica.it.
LangenscheidtDeEn: This macro searches for your word in the German-English Langenscheidt
dictionary at http://www.langenscheidt.de/deutsch/testit/wbonline/index.html. A macro for EnglishGerman is also available ( )
DiccionariosSp: This macro searches for your word in the Spanish dictionary at
http://www.diccionarios.com.
LaixiconDeEn: This macro searches for your word in the German-English technical dictionary at
http://www.tecnologix.net/laixicon, very similar to the Ernst Dictionary of Engineering and Technology. A
macro for English-German is also available ( ).
LinguadictDeEn: This macro searches for your word in the German-English technical dictionary at
http://www.tecnologix.net/laixicon, very similar to the Ernst Dictionary of Engineering and Technology. It
is also availble for English-German ( ), German-French ( ) and French-German ( ).
_________________________________________________________________
… more macros will be added in the future. Check back to www.multilingual.ch from time to time to get
the latest macros.
There are essentially three different methods for installing these macros:
Note: Installing the macros in more than one way will result in your having two Translator macros
toolbars in Word. The best method is Method 1 (saving the template in Word’s startup folder) as it
allows you to update the macros from time to time with the least effort.
To install these macros in MS Word – Method 1
This method installs the macros in Word’s Startup folder so that they are opened every time you launch
Word.
1. Print this document for reference;
2. Find out the full path of your Word Startup folder. To do so, in Word select Tools/Options/File
Locations [Italian: Strumenti/Opzioni/Directory predefinite; German:
Extras/Optionen/Speicherort für Dateien; French: Outils/Options/?]. To view the full path,
double-click on Startup [Italian: Avvio; German: Autostart] and then click on the downwardpointing arrow at the top of the dialog box to view the full path. Make a note of the full path;
3. Close this document and open Explorer. There, move the file macros_for_translators.dot from
where you have saved it to the Word Startup folder, at the location that you have just noted
down, by right-clicking and selecting Cut and then Paste in the new location.
The default locations for the Word Startup folder are the following:
Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition (Me):
=> C:\WINDOWS\Application Data\Microsoft\Word\STARTUP
Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition (Me) with user profiles:
=> C:\WINDOWS\Profiles\user name\Application Data\Microsoft\Word\STARTUP
Microsoft Windows NT 4.0:
=> C:\WINNT\Profiles\user name\Application Data\Microsoft\Word\STARTUP
Microsoft Windows 2000:
=> C:\Documents and Settings\user name\Application Data\Microsoft\Word\STARTUP
There is also a Startup folder in the directory that contains the Microsoft Office program files. Word checks this folder
during startup, in addition to the locations listed above. Word then loads any templates or add-in libraries that it finds
there. By default, this folder is in the following location:
=> C:\Program Files\Microsoft Office\Office\STARTUP
4. Close down all instances of Word and then launch Word again. From now on, the macros and
toolbars should all be available every time you start up Word, because the template is
automatically loaded on startup. (If this doesn’t work, see alternative procedure below).
Depending on your security settings, you may be asked whether you wish to activate the macros
every time. Reply “Enable macros” if asked.
To install these macros in MS Word – Method 2
This method installs the macros in Word’s Normal.dot template so that they are opened every time you
launch Word. Follow either the automatic procedure or the manual procedure.
IMPORTANT: You are advised to back up your Normal.dot file first.
Before beginning, make sure that you have opened this document (macros_for_translators.dot)
FROM WITHIN WORD, i.e. selecting File/Open and browsing to the location to which you have
saved the file [this is to ensure that the document is opened in .dot (template) mode, not in .doc
(document) mode] and that you selected “ENABLE MACROS” when you opened the document.
Automatic procedure:
1. Press CTRL-SHIFT-N. (SHIFT=upward pointing arrow above CTRL on the left of your keyboard)
The macros have now been copied to your Normal.dot template.
Manual procedure:
1. Print this document (macros_for_translators.dot) for reference.
2. With this document (macros_for_translators.dot) open in MS Word, from Word’s main menu
select Tools/Templates and Add-Ins (if you have Word in Italian: Strument/Modelli e
Aggiunte…; German: Extras/Vorlagen und Add-Ins... / French: Outils/Modèles et
compléments...);
3. Click on Organizer [Italian: Libreria; German: Organisieren];
4. Click on the Macro Project Items [Italian: Macro] tab. Under Macros available in [Italian:
Macro disponibli in] on the bottom left-hand side, select macros_for_translators. In the white
area on the left, you should now see “Translator macros” and “Translator macros - Dictionaries”.
Select these both by holding CTRL down whilst you left-click on both (these are the macros
available in the macros_for_translators.dot template), and click on the “Copy>>” button [Italian:
Copia>>] to copy the macros to your Normal.dot, in the white area on the right. You will now see
“Translator macros” and “Translator macros - Dictionaries” listed on the right as well;
5. If this does not work, it might be because on the right-hand side there is already an item by the
same name. If this is the case, click once on the item on the right and press Rename [Italian:
Rinomina] to rename it first (or delete it if you are simply overwriting the old version of the same
macros), then highlight “Translator macros” and “Translator macros - Dictionaries” on the left and
try copying it to the right again;
6. Click on the Toolbars tab [Italian: Barre degli Strumenti; German: Symbolleisten / French:
Barres d’outils]. Under Toolbars available in [Italian: Barre degli strumenti disponibli in] on
the bottom left-hand side, select macros_for_translators. In the white area on the left, you
should now see “Translator macros” and “Translator macros - Dictionaries”. Select these both by
holding CTRL down whilst you left-click on both (these are the toolbars available in the
macros_for_translators.dot template), and click on the “Copy>>” button [Italian: Copia>>] to copy
the toolbars to your Normal.dot, in the white area on the right. You will now see “Translator
macros” and “Translator macros - Dictionaries” listed on the right as well;
7. Close the file macros_for_translators.dot (this document). Now you should see the “Translator
macros” and “Translator macros - Dictionaries” toolbars in Word. If you cannot see the toolbars,
open them as follows: Select View/Toolbars [Italian: Visualizza/Barre degli strumenti;
German: Ansicht/Symbolleisten; French: Affichage/Barres d’outils] and then click on
“Translator macros” and “Translator macros - Dictionaries”.
8. Close down Word. Start up Word again, open a new document and try out the macros.
To install these macros in MS Word – Method 3
This method installs the macros under Word’s Templates & Add-ins. You will need to activate the add-in
every time you open Word.
Before beginning, make sure that you have opened this document (macros_for_translators.dot)
FROM WITHIN WORD, i.e. selecting File/Open and browsing to the location to which you have
saved the file [this is to ensure that the document is opened in .dot (template) mode, not in .doc
(document) mode] and that you selected “ENABLE MACROS” when you opened the document.
Automatic procedure:
1. Press CTRL-SHIFT-T. (SHIFT=upward pointing arrow above CTRL on the left of your keyboard)
The macros have now been added under Templates & Add-ins.
2. To enable/disable the macros in MS Word, select Tools/Templates and Add-Ins [if you have
Word in Italian: Strument/Modelli e Aggiunte…; German: Extras/Vorlagen und Add-Ins... /
French: Outils/Modèles et compléments...]. Tick “Translator macros”.
To view/hide the Translator macros toolbars in Word
1. To view/hide the Translator macros toolbars in Word, select View/Toolbars [Italian:
Visualizza/Barre degli strumenti; German: Ansicht/Symbolleisten; French: Affichage/Barres
d’outils] and tick Translator macros.
To remove the toolbar buttons that you do not need
1. You may not need all of the macros available in the Translator macros toolbars and you may feel
that the toolbar buttons occupy too much space in Word (besides, the toolbars may contain so
many macros that some are hidden and not immediately visible). If so, you may delete the
buttons that correspond to the macros that you feel you do not need. To delete the unnecessary
buttons, proceed as follows:
2. To find out which additional button(s) you wish to delete, hold your mouse (without clicking) over
the various buttons in the Translator macros toolbars to discover which macros they correspond
to (see text that appears).
3. Right-click on one of the buttons that you wish to delete from the Translator macros toolbars.
From the menu that appears,select Customize [Italian: Personalizza; German: Anpassen;
French: Personnaliser]. Right-click once again on the button that you wish to delete and this
time select Delete [Italian: Elimina; German: Löschen; French: Supprimer]. The button is now
gone;
4. You can always get them back again later by reinstalling the macro toolbars by one of the
procedures described below (see “Updating the macros”). For an updated version of these
macros, go to www.multilingual.ch. Simply proceed as specified above, overwriting the old
macros_for_translators.dot with the new version.
Updating the macros
These macros are constantly being improved and added to. The online dictionaries on which some of
these macros are based may from time to time change the way in which they work, so that these macros
need modifying accordingly. Therefore, you are advised to check back to www.multilingual.ch from time
to time to download the latest version of these macros.
The macros installed on your computer may be updated using any of the following methods:
1) If you have saved the template in your startup folder:
Method 1 (easiest: save the new .dot
file to the same folder. When asked if
you wish to replace the earlier version,
reply YES. No need to disinstall earlier
version first.)
2) If you have copied the template to your Normal.dot template: Method 2, the manual procedure
(you need to delete the old version
first!)
3) If the template is in Word’s Tools/Templates & Add-ins:
Method 3, the automatic procedure
Download