Looking for a Word macro for removing ruby text (Microsoft Word 2013)

648 views
Skip to first unread message

Jerry Pietrzak

unread,
Nov 27, 2014, 8:27:15 PM11/27/14
to hon...@googlegroups.com
My Japanese source document is a Microsoft Word file. I am working in Microsoft Word 2013 running in Windows 7.

The source file has ruby text inserted for all the kanji/kanji compounds in the document. I need to remove the ruby text, but the manual method is less than ideal since it can only remove the ruby text from at most a few lines at a time.

Does anyone have a macro that can remove ruby text from an entire document, or from a larger selected block of text? I tried searching the archives but did not find anything.

Thanks in advance,

Jerry Pietrzak
Beppu, Oita


Masako Sato

unread,
Nov 27, 2014, 10:48:18 PM11/27/14
to hon...@googlegroups.com
Google で探してみました。


[検索する文字列]: EQ *,(*)\)
[検索後の文字列]: EQ \1
で [すべて置換(A)]してフィールドコードを非表示にすると、ルビは解除されているはずです。

でも、フィールドコードは削除できません。残ったままです。
これも削除したい場合は、コピーしてテキスト形式で貼り付けるほかにないと思います。



Masako Sato

Rene

unread,
Nov 27, 2014, 11:40:35 PM11/27/14
to hon...@googlegroups.com
If it is only one file, what about a simple search/replace operation? Define format as Ruby and enter no text.

Rene von Rentzell

--
You received this message because you are subscribed to the Google Groups "Honyaku E<>J translation list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to honyaku+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jerry Pietrzak

unread,
Nov 28, 2014, 2:23:48 AM11/28/14
to hon...@googlegroups.com
Thanks to Rene and Sato-san for the suggestions. I'll give both of these a try and report back next week with my results. I tried creating a macro on my own, but it's been too long since I've made a macro. I may need to give it another try.

At this point I only have a few pages, but this job will include several files and many pages, so I want to get something figured out before the rest of the job hits.

Jerry Pietrzak


Jerry Pietrzak

unread,
Dec 1, 2014, 12:17:39 AM12/1/14
to hon...@googlegroups.com
I tried the various suggestions out this morning and have something that is not perfect, but it is a start.

The suggestion that Sato-san found was the only one that seemed to do the trick. It's a few extra steps, but it seems to work. Simplified, the steps are:
1. Set Word to show field codes (Alt-F9).
2. Search replace using wildcards to remove the content of the ruby fields.
3. Hide field codes (Alt-F9 once more).
4. Copy the text and paste without formatting to remove the (now empty) ruby fields.

The last step is a bit of a hassle, but it seems to be better than using the "clear readings" option, which is what someone else suggested. That's what I was doing before, but the "clear readings" option only clears the ruby text from about two lines at a time. While this is the cleanest approach, I anticipate seeing at least a hundred pages in this job, so I was trying to avoid this method.

Again, thanks to everyone for their suggestions. If I come up with anything better, I'll update this thread.

Jerry Pietrzak
Beppu, Oita


Edward Lipsett /t

unread,
Dec 1, 2014, 12:23:36 AM12/1/14
to Honyaku Group

I used to fiddle with all this stuff and haven’t for a thankfully long time, but I suspect if you save the whole thing as Word XML you can then do a smart search&replace and delete them all in one fell swoop. 

Edward Lipsett
Reply all
Reply to author
Forward
0 new messages