Sync CafeTran with Word
Thread poster: 2nl (X)

2nl (X)  Identity Verified
Local time: 17:01
Dec 7, 2014

Here is an AppleScript that syncs the content of the source segment box with the underlaying Word document. Whenever you move to the next segment, the source segment is found in the Word document:


Demonstration movie:

Solutions for Word for Windows are available too.


Selcuk Akyuz  Identity Verified
Local time: 19:01
Member (2006)
English to Turkish
+ ...
web resource Dec 7, 2014

Synchronisation with the source document, to see the context? What about saving the doc file as html and adding as a web resource in CafeTran?

It can be used for all Office formats. For pdf? Not sure. AFAIK pdf not supported in web resources. Saving a pdf as web page may work.


Michael Beijer  Identity Verified
United Kingdom
Local time: 16:01
Member (2009)
Dutch to English
+ ...
AutoHotkey script to automatically preview source document from inside CafeTran (updated) Dec 7, 2014

For all you Windows users out there, I created an AutoHotkey script to view your source document (for preview purposes) while translating in CafeTran. My script automatically selects the text in your current source segment (strips out any tags), switches to your source document (this is a Word document in this video, but PDFs work too; probably also Excel and PowerPoint) and finds the relevant location in the document. All you need to do is enter the relevant document name in the script by right-clicking on the "DocPreview.ahk" icon in your taskbar prior to using it.

I made a video showing how it works:

; Copies selected text in current segment in CafeTran and runs search in source document
; (works with both PDFs and Word documents)
; Written by Michael Beijer
; Note1: Specify name of the .pdf or .docx prior to use by right-clicking on AHK script icon in taskbar
; Note2: Make sure to enable "Edit > Copy source segments to clipboard"
; (which ensures the current source segment text is always copied to the clipboard, without tags)

!p:: ; Shortcut: Alt+P

WinActivate, src.docx ; Change focus to source .pdf or .docx; enter name here
Send, ^f ; Open Find dialogue in source document (Ctrl+F)
Send, ^a ; Select any previous text in the Ctrl+F field (Ctrl+A)
Send, ^v ; Paste selected text over previous selection (Ctrl+V)
Send, {Enter} ; Press "Next" in the Ctrl+F dialogue




2nl (X)  Identity Verified
Local time: 17:01
SearchInPDF Dec 7, 2014

Chris Stone came with the solution for searching in PDF files, using Skim for OS X:

set textToFind to get the clipboard
tell application "Skim"
set foundText to find front document text textToFind
select foundText with animation
end tell


Meta Arkadia
Local time: 23:01
English to Indonesian
+ ...
It's even better Dec 8, 2014

By the looks of it, both the AHK and the Keyboard Maestro macro are CafeTran independent, so they can be used by all CAT tool users.

I don't know about AHK, but if 2nl would be kind enough to make the KBM macro available as AppleScript, all Macs can use it (click on “Or by script” at the top of the macro and click “Or by AppleScript”, Cmd-A, followed by Cmd-C in an AppleScript window, save script as applet, assign keyboard shortcut in Keyboard Preferences).

And if you use Preview or File Viewer rather than Skim, you should be able to adjust the script in such way that you can also use it for all formats* that can be opened by those apps, including Office:mac files.

*for Preview, that's basically everything that can be viewed by Quick Look, File Viewer (free) even offers a few more formats.



[Edited at 2014-12-08 01:52 GMT]


2nl (X)  Identity Verified
Local time: 17:01
Turn hyphenation off Dec 9, 2014

In order to get the best results with this script, you should (ask your clients to) turn hyphenation off before the PDF is created. Skim cannot search across hyphenation marks.


2nl (X)  Identity Verified
Local time: 17:01
There is a tool to remove the hyphens Dec 10, 2014

I just tested it and you can use Infix Pro to remove the hyphens.

From Inceni Support:

- Open the Preferences panel by selecting "Preferences" from the "File" menu item.

- Select the "Spelling" tab on the panel, change the spelling language to the language that the document is written in and ensure that the check box "Hyphenate words when editing" is unchecked.

- Press "OK" to save your changes.

Select one hyphen at line ending, plus the extra space. Then choose Find/Replace and insert the hypen plus space into the Find field. Leave the Replace field empty.

- Click on the blue underlined link next to the "Replace:" text field to open the "Replace Format" dialog. and change the "Reflow:" combo box from "Containing Line" to "Containing Paragraph".

- Click "OK" to save your changes.

- Click "Replace All" to start the find and replace.

You will get a copy of your PDF with the hyphens removed. Nice!


Meta Arkadia
Local time: 23:01
English to Indonesian
+ ...
Tested Dec 11, 2014

And if you use Preview or File Viewer rather than Skim, you should be able to adjust the script in such way that you can also use it for all formats* that can be opened by those apps, including Office:mac files

I finally tested my original Automator Applet with .doc, .docx, .xlsx, and .pdf, of course. You can see an animated GIF of a search in a .doc file here: (way too big to post on this forum. 2 MB).

- the document should be opened in Preview. It seems all formats that can be previewed by Quick Look can be opened in Preview.
- you should enter any search term in Preview before your first search
- copy the search term to the ClipBoard (select, hit Cmd-C)

Then, either run the applet by clicking it (as in the animated GIF), or by hitting a keyboard shortcut, to be assigned in System Preference | Keyboard | Shortcuts | App Shortcuts.

Since this is a Clipboard script, rather than an app specific one, this should work for all documents you can open in Preview, and for a search from within all applications, including all CAT tools.


You can download the app here (Mac only, of course):




2nl (X)  Identity Verified
Local time: 17:01
Script doesn't work anymore after update of Word Dec 13, 2014

After updating Word to this week's build (14.4.7) the script doesn't work anymore. I'll try to find a solution for this. For the time being I'm saving my DOCX files (with hyphenation turned off!) as PDF files, since the FindInPDF script still works.


2nl (X)  Identity Verified
Local time: 17:01
Script is fixed – syncing works again Feb 23, 2015

Please change the script to:


in order to making syncing with Word:mac 2011 14.4.8 again. I'm currently working on temporarily highlighting the found result in Word, since the normal blue selection disappears when Word loses focus.


[Edited at 2015-02-23 09:34 GMT]


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

Moderator(s) of this forum
Natalie[Call to this topic]

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

Sync CafeTran with Word

Advanced search

Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
BaccS – Business Accounting Software
Modern desktop project management for freelance translators

BaccS makes it easy for translators to manage their projects, schedule tasks, create invoices, and view highly customizable reports. User-friendly, integration, community-driven development – a few reasons BaccS is trusted by translators!

More info »

  • All of
  • Term search
  • Jobs
  • Forums
  • Multiple search