Forum: CAT Tools Technical Help
Topic: From Ms Word table to TMX file
Poster: Hans Lenting
Post title: Very thorough
Your approach is very thorough. For instance: I hadn't thought of conversion of these ampersands.
My initial thought was: it would be nice to have a macro to use when you're reading/proofreading an Ms Word document that contains a bilingual table with two columns and you want to create a simple TMX file from that table. Perhaps retaining the bold and italic formatting, nothing fancy.
Language codes can either be asked via a prompt or set to e.g. us_US and de_DE to change them later.
So, the macro should:
[Edited at 2022-08-21 12:41 GMT]
Topic: From Ms Word table to TMX file
Poster: Hans Lenting
Post title: Very thorough
Your approach is very thorough. For instance: I hadn't thought of conversion of these ampersands.
My initial thought was: it would be nice to have a macro to use when you're reading/proofreading an Ms Word document that contains a bilingual table with two columns and you want to create a simple TMX file from that table. Perhaps retaining the bold and italic formatting, nothing fancy.
Language codes can either be asked via a prompt or set to e.g. us_US and de_DE to change them later.
So, the macro should:
- Copy the whole table.
- Replace bold and italic formatting and ampersands with markup.
- Replace TAB characters and NEWLINE characters with the correct strings to create valid TUs.
- Prepend the clipboard's context with the first lines of a TMX file (up to the BODY markup)
- Append the /TMX closing markup to the clipboard's context.
- Write the clipboard's context to a file with the extension '.tmx'.
[Edited at 2022-08-21 12:41 GMT]