Sunday, December 30, 2007

Quickly searching online references using a browser add-on

Today, I'd like to tell you about a nifty add-on that helps you search various references such as Honyaku, Goo, Life Science Dictionary, and so on. This add-on is Needlesearch – download it and install it as an add-on to Firefox. The latest version is 3.2. The Needlesearch toolbar will be installed on your browser and it looks like this:

The image above shows that Honyaku is the online reference you will search, 検索 is the term you are searching for and the four icons to the right are the Needlesearch icons, details of which you can read in the Needlesearch help online.

The concept here is that you add as many online references you like, then copy and paste the term you wish to search and hit the Enter key. Needlesearch will search through, say the Honyaku archives, and give you all the hits and highlight them for you – you need not go to the Honyaku archive website.

Here is a screenshot of a search and hits for the term 環境 in Honyaku.

The method of adding search engines (references you need to search) is explained here. Adding English search engines is a fairly easy task; searching for Japanese is a little more complicated since you may need to add encoding details too (UTF_8, shift_jis, euc). You need to experiment with the settings.

I have given below the settings for Honyaku, Goo and Life Science Dictionary here; just open the Needlesearch Editor and enter the details in Properties; you should be able to make a start with these three references. I have yet to experiment on others such as Eijiro, and will put up the same in this blog in the near future. In the meanwhile, if you do experiment and are successful with the settings, you can post them here as comments for the benefit of others reading this blog.

After you install Needlesearch, click the Editor Icon, Add Item, then the Properties button while New Item is selected, and enter the details exactly as below ( except the name, which you may change as you like). Here are the settings (you may leave other fields blank):


Enter Name: Honyaku

Enter Search url:

Encoding: UTF_8

Method: get


Enter Name: Goo

Enter Search url:

Encoding: shift_jis

Method: get


Enter Name: Life Science Dictionary

Enter Search url:

Encoding: shift_jis

Method: post

If you check the box next to the Default setting, the checked reference will appear as the default engine when you open the browser. Enjoy!

Saturday, December 29, 2007

Inserting special characters in Word

You may sometimes need to type special characters that you find in the source text – a zero with a forward slash through it often used to represent diameter in Japanese technical documents is one example that comes to mind.

A. Superposing one character on the other.

Say you wish to place a slash on top of a zero.

1) Click Insert/Field

2) Click the Field Codes button.

3) Copy this line using Ctrl + C:

eq \O(0,/)

4) Now paste it in the Field Codes box after deleting the "=" sign (if you find it in the box).

5) Click OK.

The symbol should appear as follows:

You can similarly create the following by replacing the "0" and the "/" in the parenthesis of the equation by the relevant characters to obtain:

B. Inserting a horizontal bar above a character (say m)

Here is one way to do this:

1) Click Insert/Field

2) Click the Field Codes button.

3) Copy this line using Ctrl + C:

eq \x \to (m)

4) Now paste it in the Field Codes box after deleting the "=" sign (if you find it in the box).

5) Click OK.

You should get this:

You can similarly create the following by replacing the "m" in the parenthesis of the equation by relevant character:

You can copy any of the characters you created to an Autocorrect entry so that if you type "abar" you get:

Thursday, December 27, 2007

Searching multiple dictionaries simultaneously

With huge dictionaries packed in single compact disks available at affordable prices, I have almost given up flipping through my large library of books, although I do refer to them when I cannot find what I'm look for in a CD. I have stored about 10 CDs (J-E/E-J dictionaries in various fields) on my hard disk using an application called Virtual CD that enables virtual drives to be created in your system and CDs to be copied to these drives. The overall effect is that your PC thinks that each virtual drive is a CD-ROM drive with a CD in it.

I use DDwin to search through various references simultaneously. DDwin has a macro enables you to select a phrase and hit a hotkey to search through various references. Here is a snapshot of a search through various dictionaries for the word "virtual" of "virtual drive" selected from this article (if you click on it, you should get a clearer image in a new window).

The colored icons (理化学、コンピ(コンピュータ)….) and so on indicate the reference CDs I have registered in DDwin.You can either:

1. Copy the DDwin macro given in its Help menu, and modify this line:

DDwin = "C:\program files\ddwin\ddwin.exe ,1,新規グループ,,"

to suit the path to DDwin in your system and the name of the dictionary group (which in my case is "新規グループ" in which I have registered all my dictionaries;

2. Set the macro as a menu item in Word; or

3. Set DDwin to appear when you right-click a term in Word and launch DDwin.

Here's how a right click on "グループ" looks like. NewDDWin is the name I gave to the macro that launches DDwin to search through all your references for the term "グループ."

To set the macro to appear in your right click menu, here's what you do:

1. From the Tools menu in Word, pick Customize.

2. The Customize dialog box will open. Click the Toolbars tab.

3. Scroll down, and check the box next to the Shortcut Menus option. A small Shortcuts Menu dialog box will appear showing the labels Text, Tables, and Draw.

4. Position the Shortcuts Menu dialog box so it is not overlaid on the Customize dialog box.

5. In the Shortcut Menus dialog box, click on the Text label. This will display a list of choices.

6. Click on the Text option near the bottom of the list. This will display the menu that appears when you right-click while typing in a Word document.

7. In the Customize dialog box, click the Commands tab.

8. In the Categories list, scroll to Macros and click on it.

9. In the Commands list, find the name you used when you installed your macro. (If you used the name "NewDDWin", it will appear as Normal.NewMacros.NewDDWin.)

10. Click on the name, then drag it to the spot on the right-click menu where you want the dictionary button to appear.

That's it. Next time you come across a difficult term, right click it and launch DDwin.

Monday, December 24, 2007

Translating text in text boxes

Text contained in text boxes in Word can be estimated and translated easily by first extracting the text to a separate file. Note that the Word Count feature in Word (Alt + T + W) does not count text in text boxes. When you receive a Word file with lots of text boxes, click on the text boxes one by one and find out whether they are grouped or not. If grouped, ungroup them one by one. Then save the original file with a different name and run the macro given below (this is to make sure that your original file remains intact). It dumps all the text in the text boxes to a different file, which you may with a "tb" suffix to indicate that the text in this file is from the text. Now take the w count (Ctrl + Alt + W) of the original file and add it to that of the file with the text from the text boxes to arrive at the total Word count.

The "Extract from Textbox" macro was written by Yves Champollion (Wordfast author) when I made a request to him through the Wordfast mailing list to write one about 5 years ago. It still works fine in Word 2003; I have not tried it in later versions. Here it is:

Sub ExtractFromTextBox()


' Macro ExtractFromTextBoxesVersion3recorded

' by Yves


Dim i As Integer, Boite As Shape, ThisDoc As Document

Set ThisDoc = ActiveDocument


For Each Boite In ThisDoc.Shapes

If Boite.Type = msoGroup Then

For i = 1 To Boite.GroupItems.Count

With Boite.GroupItems(i).TextFrame

If .HasText Then

Selection.InsertAfter .TextRange


Selection.Start = Selection.End

End If

End With



With Boite.TextFrame

If .HasText Then

Selection.InsertAfter .TextRange


Selection.Start = Selection.End

End If

End With

End If


End Sub

Sunday, December 23, 2007

Very useful Word shortcuts

After about fifteen years of typing on the keyboard nearly eight hours a day, I experience pain in my right wrist, presumably because of excessive mouse use. I wore a wrist band for the next 10 days, changed the keyboard to an ergonomic keyboard and started using keyboard shortcuts extensively. I was able to get rid of the wrist band soon after.

I have selected some of the most useful shortcuts that I use all the time – these are in addition to the common ones that I have listed below.

Common shortcuts in Word





Ctrl + C


Ctrl + P


Ctrl + V


Ctrl + S

Save file

Ctrl + X

Cut and Copy


Save file as

Ctrl + F


Ctrl + B


Ctrl + H

Find and Replace

Ctrl + I


Ctrl + O

Open file

Ctrl + Shift + +


Ctrl + N

Open New Document

Ctrl + Shift + -


If you still use the mouse instead of some of these shortcuts – beware! Your wrist may start complaining, especially if you are typing eight hours a day. Here are the ones that I found useful and worth memorizing:

Useful Shortcuts in Word





Repeat previous action

I would rate this as probably the most useful keyboard shortcut. Paste the same table or apply the same header style on as many pages as you want by pressing just one key!

Ctrl + Alt + (Num) +

Keyboard Shortcut

If you often customize your keyboard shortcuts, this shortcut tells you what action a keyboard action is assigned to. After you press Ctrl + Alt + + , the cursor changes shape to a "four-circle" shape. Now press a keyboard shortcut or bring it click on an icon on the menu bar.

Ctrl + F6

Cycle through documents

If you have several Word documents open and wish to cycle through them, keep pressing this shortcut successively.

Alt + Shift + Left Arrow or Right Arrow

Create Heading Styles

I find this very useful to create Heading styles. If you use the right arrow with Alt + Shift, the Heading style drops from Heading 1, Heading 2 and so on. Useful to format only the headers so that you can create a Table of Contents later in one shot.


Extended selection

You'll love this shortcut. To select a sentence or a block, place the cursor at the beginning of the text, press F8 , then scroll to the end of the text you wish to select, and place your cursor there. That's all! The entire block of text is selected.

Shift + F5

Last Edit Point

Return to your last edit point. Cycle through the last three edit points. To resume at the last edit point when you start work the next day, use this keyboard combination.

Alt + Drag Mouse

Select a column of non-table text

Although this does make use of the mouse, its an excellent method to select a vertical block of text say up to 30 characters.

Shift + F3

Toggle case

Change between ALL CAPS ON to lower case.

Ctrl + A

Select entire document

This selection includes the end paragraph mark also.

Ctrl +F2

Print Preview

I use this quite often to see what the finished document would look like when printed. Press this key combination again to return to the normal view mode (that I usually use).

Besides the above, if you wish to print out a complete list of shortcut keys in Word, do the following:

1. Press Alt + F8.

2. In the "Macros in" box, select Word commands.

3. Click ListCommands in the "Macro name" box.

4. In the "ListCommands" dialog box, select "Current menu and keyboard settings."

5. A complete table of settings with description appears – print or save this file.

Saturday, December 22, 2007

Quickly printing a list of files to a file

I sometimes receive a number of files by e-mail from clients for translation. In the quotation I submit to the client, I append the list of files that I have received (it is important to include dates and sizes of each file). This list ensures that there is no mistake in what you translate and deliver to the client. Some of my clients have a tendency to change the source text after sending the files and forget to send me the revised files. After I deliver the translated files they may point out that some of the text has not been translated. This is where the list of files comes in handy. I ask them to send me the file and compare the date stamp with that of the file in the list I have prepared.

I use the good old DOS command to create this list of files. Here's what you do:

1) Write down the path to the directory on a memo (say c:\trans\clientA\december)

2) Click Start/Run (in Japanese Windows, ファイル名を指定して実行)

3) Type "cmd" (without quotation marks) and hit Enter

4) Type "cd c:\trans\clientA\december" (without quotation marks; note the space between cd and c:. This takes you to the directory where you stored the files)

5) Type "dir > filelist.txt" (without quotation marks)

This gives you the complete list of files in the directory that includes the date , time, and file size. Append this file when you send in your quotation. Here's an excerpted filelist.:

==== Excerpt from filelist.txt ===============

2007/10/19 10:48 97,042 base.swf

2007/10/24 15:13 1,225 base01.rbp

2007/10/19 10:49 24,070 certificate.swf

2007/10/19 12:50 30,330 certificate.swfproject

2007/10/19 12:56 24,111 certificate_translated.swf

2007/10/18 11:44 3,662 Count13flReport.html

2007/10/19 10:50 34,642 glossary.swf

2007/10/19 10:51 163,560 help.swf

8 個のファイル 378,642 バイト

For more options related to the "dir" command, type "dir /?" at the command prompt. "dir /B" gives you just the names of files in the directory.

Friday, December 21, 2007

Getting rid of pesky single-byte Katakana from Japanese source documents

Today, let's take a look at how to quickly get rid of single-byte Katakana characters in Japanese documents before translating them. You may ask why one needs to do this. Well, most documents I translate have all Japanese text (Hiragana, Katakana and Kanji) as double-byte characters (except numbers, which I prefer to keep as single-byte characters). When you use a CAT-tool, these pesky single-byte Katakana characters reduce your chances of getting 100% matches because your translation memory may not have single-byte Katakana characters. So there's a work around provided by Ryan Ginstrom, making use of his excellent Wide2Narrow macro.

Here's what you do.

1. Select the entire document in Word using Ctrl + A.

2. Deselect the tail (From the end of the document press Shift + Left Arrow)

3. In Word, go to Format/Change Case/Full Width and press OK. All your single-byte characters (including Romaji and numbers are changed to double-byte characters).

4. Now run the Wide2Narrow macro.

By doing so, the Romaji and numbers are converted back to single-byte characters.

Tuesday, December 18, 2007

Macro to copy red font text

Dec. 19, 2007

Macro that assists in translating parts of a document

I have a client that marks parts of large Word documents in red font and asks me to translate them. This is because the rest of the text has already been translated.

I wrote a macro with the help of a Word MVP called CopyFontRed. This macro selects all the text in red and copies it to a separate Word document. You can quickly do a character/word count of only the text that you need to translate and prepare an estimate. Drag this macro also to your menu bar and place it there, as explained in yesterday's macro. You can change Red to Blue, for instance, in the macro below, if you wish to dump blue text to a separate file. Here it is; enjoy!

Sub CopyFontRedText()

' Date 01/04/11 Recorded by Gururaj Rao

' Copies Red Text to a Separate File


Dim SourceDoc As Document, Target As Document, FontColorIndex As String

On Error GoTo Endit

Set SourceDoc = ActiveDocument

Set Target = Documents.Add



Selection.Find.Font.ColorIndex = wdRed

With Selection.Find

.Text = ""

.Replacement.Text = ""

.Forward = True

.Wrap = wdFindContinue

.Format = True

.MatchCase = False

.MatchWholeWord = False

.MatchWildcards = False

.MatchSoundsLike = False

.MatchAllWordForms = False

End With

While Selection.Find.Execute = True

FontColorIndex = Selection.Text

Target.Range.InsertAfter FontColorIndex & vbCr




Exit Sub

End Sub

Indispensable Paste Special Macro

Just can't do without it. I use it at least 10 to 15 times a day. Maybe more. Use it when I am translating a document in MS Word and picking up terms from various sources.

You find the translation of a term in an online dictionary, or in a Powerpoint file. You copy it (Ctrl + C) and wish to paste it (Ctrl + V) into the document you are translating in MS Word. You do so and find that the pasted text is in a format quite different from the format of the surrounding text. You have to select the offending text and change its font, the font size and sometimes the color. Uggh!

Copy this macro to your list of macros. I generally go to Tools/Macro/Macro and type PasteSpecial (the name of the macro), click Edit, and copy the macro so that there's only one "Sub" and one "End Sub." Save the macro, then place it on the menu bar at the top by: Alt + T(ools) + C(ustomize); click on Commands/Macros, scroll down until you find Normal.NewMacros.PasteSpecial and drag it right up to the top of the screen adjacent to the Help menu and drop it there. Don't close the Customize window. Right click on the item you have just deposited on the top of the screen, delete "Normal.NewMacros" from the longish phrase, and insert "&" in front of the "l" of Paste Special. Close the Customize window. That’s it. Now all you need to do to paste a glossary term into your text in Word is hit Alt + L instead of Ctrl + V. The text will be pasted in the same format as the surrounding text.

Sub PasteSpecial()

' PasteSpecial Macro

' Macro created 2006/11/18 by Gururaj Rao

Selection.PasteSpecial DataType:=wdPasteText

End Sub