Word macro for dictionary look-up
Persoa que publicou o fío: bhaderlie
bhaderlie
bhaderlie  Identity Verified
United States
Local time: 12:18
German to English
Mar 12, 2003

When I come to a word or phrase that I need to verify while translating, I simply type the SL term in square brackets and continue typing the TL text. Later on, I go from bracketed word to bracketed word in my terminology verification stage.



I wrote a macro many moons ago in WordPerfect for DOS that searched for each bracketed phrase in a document, copied the phrase, and pasted it in a second document (voc.doc), repeating the process until it came to the end of the document,
... See more
When I come to a word or phrase that I need to verify while translating, I simply type the SL term in square brackets and continue typing the TL text. Later on, I go from bracketed word to bracketed word in my terminology verification stage.



I wrote a macro many moons ago in WordPerfect for DOS that searched for each bracketed phrase in a document, copied the phrase, and pasted it in a second document (voc.doc), repeating the process until it came to the end of the document, then sorted all of the terms in the voc.doc document for easy look-up in multiple (paper) dictionaries.



I have not been successful in creating a similar macro for MS Word. I did record a macro that kind of half does the job, but it\'s not satisfactory. Rather than post the entire Word macro here, let me pose two questions for starters:



1) How can I copy an entire phrase between square brackets in Word? In WordPerfect, this was very simple. In my recorded Word macro, I simply ran the Find command, looked for the first square bracket ([), then copied only the first word after the opening bracket. Most of the time, the term of interest is a single word, but not always.



2) What is the Visual Basic syntax to have the macro run the find/copy/paste steps until it gets to the end of the document? It seems like a \"while\" statement is what I want, something like:

While Selection.Find.Execute()

yada yada

Wend



The \"yada yada\" represents running Find to go to the next opening bracket, selecting the word (or, ideally, the phrase) after the bracket, copying, swapping to the second file (voc.doc), pasting the text, entering an end of line command, and returning to the original document, then re-running the process.



So I need to know what I need to put on the line containing the \"While\" statement in the macro.



Any help with this would be greatly appreciated. Oh, and if you\'re wondering why I don\'t get a \"real\" translation program, I just got a new computer and found that none of my Windows 95 translation and dictionary programs will run on XP, and besides, the hand look-up method serves my needs just fine as a part-time free-lancer.



Thanks,

Brooks
Collapse


 
Philip Ronan
Philip Ronan
United Kingdom
Local time: 19:18
Japanese to English
+ ...
Great idea! Mar 13, 2003

I used to write loads of macros for Word 6, but since Microsoft brought in Visual Basic I\'ve pretty much given up. (Their documentation is truly awful.



I\'m rather busy right now, but as soon as I get a bit of time to myself I\'ll see if I can help out.


 
sylver
sylver  Identity Verified
Local time: 02:18
English to French
Selecting Mar 20, 2003

Quote:


On 2003-03-12 06:15, bhaderlie wrote:

1) How can I copy an entire phrase between square brackets in Word? In WordPerfect, this was very simple. In my recorded Word macro, I simply ran the Find command, looked for the first square bracket ([), then copied only the first word after the opening bracket. Most of the time, the term of interest is a single word, but not always.







If ... See more
Quote:


On 2003-03-12 06:15, bhaderlie wrote:

1) How can I copy an entire phrase between square brackets in Word? In WordPerfect, this was very simple. In my recorded Word macro, I simply ran the Find command, looked for the first square bracket ([), then copied only the first word after the opening bracket. Most of the time, the term of interest is a single word, but not always.







If that helps, you can select everything that\'s between brackets using the search expression \\[*\\] and activating wilcards. ▲ Collapse


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Word macro for dictionary look-up






Pastey
Your smart companion app

Pastey is an innovative desktop application that bridges the gap between human expertise and artificial intelligence. With intuitive keyboard shortcuts, Pastey transforms your source text into AI-powered draft translations.

Find out more »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »