https://www.proz.com/forum/cat_tools_technical_help/43770-calling_a_cat_tool_from_excel.html

Calling a CAT Tool from EXCEL
Thread poster: JCFS
JCFS
JCFS
Local time: 15:43
English to Portuguese
+ ...
Mar 14, 2006

Hi All,

I'm looking for a CAT Tool I can call from VBA in Excel.
I'd like to send it a text segment and have it return a 100% / Best Fuzzy mach pair (also nice-to-have would be to color the texts showing the differences like Trados/WordFast).
Does anybody know what Tools can be called from another program?

Thanks for your attention and help.

Rgds, JS


 
Olaf (X)
Olaf (X)
Local time: 20:43
English to German
You can use the Trados API Mar 15, 2006

If you have Visual Basic or VBA skills you can call Trados Translator's Workbench from Excel. The following very simple macro opens the current or last TM, retrieves the value of A1 and writes the translation in A2, if it exists. (You'll need to add a reference to the Trados Translators Workbench (tw4win.exe) before you execute the macro.) For more information please refer to the Trados SDK.

'------ cut here ---------
Sub SearchFromExcel()

Dim Source, Target As S
... See more
If you have Visual Basic or VBA skills you can call Trados Translator's Workbench from Excel. The following very simple macro opens the current or last TM, retrieves the value of A1 and writes the translation in A2, if it exists. (You'll need to add a reference to the Trados Translators Workbench (tw4win.exe) before you execute the macro.) For more information please refer to the Trados SDK.

'------ cut here ---------
Sub SearchFromExcel()

Dim Source, Target As String

Dim twb As TW4Win.Application
Dim tm As TranslationMemory
Dim tu As TranslationUnit

Set twb = GetObject(, "TW4Win.Application")
Set tm = twb.TranslationMemory

If Not (tm.IsOpen) Then
twb.OpenLastTM
End If

Source = Cells(1, 1) 'A1

tm.Search Source

Set tu = tm.TranslationUnit

If tm.HitCount 0 Then 'there's a not equal sign before 0
Cells(1, 2) = tu.Target 'A2
Cells(1, 3) = tu.Score & "%" 'A3
Else
Cells(1, 2) = "---"
Cells(1, 3) = 0 & "%" 'A3
End If

twb.Clear
End Sub


'------ cut here ---------
Note that somehow the BB removes angle brackets. There should be a smaller than sign followed by a larger than sign between tm.HitCount and 0.



[Edited at 2006-03-15 08:54]
Collapse


 
JCFS
JCFS
Local time: 15:43
English to Portuguese
+ ...
TOPIC STARTER
TRADOS API Mar 15, 2006

Hi Olaf,

Thanks for your reply!!! This is down the line I was looking for.

However, I've been to TRADOS' (now SDLTrados) site and could not find the TRADOS SDK - do you know where/how to get this?

Again, thanks a lot. - JS

[Edited at 2006-03-15 16:36]

[Edited at 2006-03-15 16:37]


 
Olaf (X)
Olaf (X)
Local time: 20:43
English to German
SDK is contained in the LSP version Mar 15, 2006

JCFS wrote:

However, I've been to TRADOS' (now SDLTrados) site and could not find the TRADOS SDK - do you know where/how to get this?



The SDK isn't installed by default, you'll have to select a custom install and then choose to install the SDK option. In Version 7.x this is one .chm file (in older versions it was divided in 3 .chms). You might need the LSP version of Trados for this.


 


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


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

Calling a CAT Tool from EXCEL


Translation news related to CAT tools





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 »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »