Macros, scripts, coding
In the early years of my freelancing I worked mostly in Microsoft Word. I either did not use any CAT tool or I used the free version of Wordfast (now called Wordfast Classic) which is a set of macros in itself.
I was looking for ways to make my tedious work of translating in Microsoft Word a bit easier. Soon I found out about macros. Initially I created them by recording, then I learned more about coding them.
Now, though most of my translation work is done outside of Microsoft Word, in CAT tools, I still have most of the macros I created more than 10 years ago. Many of them fell into disuse, but there is one that I use regularly when I need to do some work in Word. It is the macro I called ‘TextFieldFit’. When I draw a text box, I run the macro to reduce the inner margins, remove the border around the box and reduce the font size. I use text boxes to translate drawings that did not get imported into my preferred CAT tool, the SDL Trados Studio.
If you want to use the macro, here goes:
Sub TextFieldFit()
'
' TextFieldFit Makro
' Makro zapisane 15-03-00 przez Piotr Bieńkowski
'
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoFalse
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.TextFrame.MarginLeft = 0#
Selection.ShapeRange.TextFrame.MarginRight = 0#
Selection.ShapeRange.TextFrame.MarginTop = 0#
Selection.ShapeRange.TextFrame.MarginBottom = 0#
Selection.ShapeRange.LockAnchor = True
Selection.Font.Name = "Arial"
Selection.Font.Size = 7
End Sub
I've always been fascinated by coding, the ability to make the computer do something automatically, and there was time when I would read books about Perl and XML/XSLT as bedtime books. :-)
But it wasn't all theoretical, and if you want to check out one script in Perl and two XSLT transformations, follow this link.
So I have basic working knowledge of VBA (the language of Word macros), Perl, Python, XSLT, and I am not scared when I see what's inside a HTML or XML file in their various flavors.
Coding is not for everyone, but I believe that if I had not become a translator, I would have become a coder. I wish I could be both, but there's just not enough time. Sigh...
Comments
Post a Comment