Fields in Microsoft Word documents

A few weeks ago an agency client sent a German-English project with a few big Word files. In the job order, they specifically asked me to make sure to not delete any fields in the Word documents because that had happened in the past with other translators and it is a big pain for them.

Since I am using Trados Studio, I assumed that would not be a problem since the tags are displayed clearly and the QA Checker would catch any mistakes. I finished the job, ran the QA Checker and exported the documents without any problems. Or so it seems...

I wrote a simple C# program using the Microsoft.Office.Interop.Word assembly and compared the fields between source and target docs. There is a way to count the fields in a Word document like this:

using Word = Microsoft.Office.Interop.Word;
using Document = Microsoft.Office.Interop.Word.Document;

var oWord = new Word.Application

string fileName = Path.GetFullPath("source directory" + "file name");

Document oDoc = oWord.Documents.Open(fileName);

// oDoc.Fields.Count is the number of fields in the current Word document
Console.WriteLine("oDoc.Fields.Count:" + oDoc.Fields.Count);

Unfortunately in many of the documents, there were less fields in the target docs compared to the source docs! I spent some time trying to figure out where the problem could lie. Maybe SDL Trados just deleted some junk fields? I couldn't find anything relevant that was missing between the files.

It turns out there is another way to count fields in a document inside of Microsoft Word by searching for "^d" (hidden text must be displayed for this to work). Using this counting technique, I found the same number of fields in the source and target docs.

My question: Any idea what is happening here? What fields could have gone missing? I deleted a lot of non-breaking hyphens, but that does not seem to be related.

Thanks!
Gary

emoji
Parents Reply Children
  • Hi Lyds

    Thanks for your reply.

    At any point when opening either the source / target document, do you get this warning:" This document contains fields that may refer to other files. Do you want to update the fields in this document?" --> Yes, there are a lot of references to other files that generate these warning messages. The client informed me about this and said to ignore the warnings.

    Does the document have bookmarks / index page? --> The documents have some internal references but no index page. Not sure about bookmarks. How can I search for bookmarks in Word?

    What file type are you using as we have a few for MS word? --> The files are all docx and I am using the Microsoft Word 2007-2019 file type (this file type comes first in the File Types list).

    I know you mentioned you did a QA but to review please can you check this out in case something got forgotten: https://gateway.rws.com/csm?id=kb_article_view&sysparm_article=KB0028301 --> I think the settings are OK (but they look a little different in Trados Studio 2021)

    I ran the QA checker again on one file and still get 44 errors, but none are relevant in my opinion (all are "Tag "<char name="nonbreakhyphen"/>" removed.").

    I think that the target documents are OK, but there is some anomaly in the internal Word field count. I might try probing the source documents a little more and try to figure out exactly which field was lost in the conversion.

    Gary

    emoji