Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2k3 styles transform into Asian; how to find in Styles collection

Status
Not open for further replies.

MakeItSo

Programmer
Oct 21, 2003
3,316
DE
Hi friends,

I'm having a bit of a problem here:

Some of our Word documents get damaged while processing. The formatting still "looks" good, alas it isn't.
With "processing" I mean "translating". The translation is done by various freelance translators, who work with a CAT tool (Computer Aided Translation software) that plugs on to Word.
There are different versions of that CAT tool in use, as well as different versions of MS Word.
This cannot be helped, we have to live with that. In the vast majority of projects, this is no problem at all and all works fine.
In one project however, the files always get back with altered formatting.
SPOILER ALERT:
Although I say "styles" in the heading, this is not quite correct; this is all plain character formatting!
I know this problem probably would not occur at all if these files were formatted using paragraph styles. Alas, they aren't because these files will later be processed by an age old legacy software wich does not know styles, hence all is character formatted.
This situation is by design and by customer. Cannot be altered.


So here's the dillio:

e.g. Original formatting: "Arial 14 pt, bold, black"
Formatting after translation: "(Latin) Arial (Asian) Times New Roman, (Standard) Arial, 14pt, bold, black"

As you can see, the formatting information is preserved; internally however, the paragraph is treated as "Asian" (the language is actually e.g. French, Spanish or good old English) resulting in an output of Times New Roman rather than Arial, as well as multiple other highly unwanted side effects.

I repair such paragraphs by selecting all paragraphs of that formatting, applying a Font reset, and re-assigning the desired formatting.

This works OK, but with growing document size, this process is getting increasingly tedious and unnerving.
I'd like to cycle through all these "Asian" formattings, resp. pseudo-styles, in order to do the font resetting automatically rather than manually.

Alas, I have no clue as to how to identify these "styles" in the Styles collection. I have already used the VBA watch window to scrutinize the selected Style properties to no avail.

I've already assigned a little macro to an F key to ease my pain.
This is what I do right now:
Code:
Sub resettononasia()
Dim kur As Integer, fet As Integer, siz As Long, col As Long, hili As Long
    On Error Resume Next
    
    kur = Selection.Font.Italic
    fet = Selection.Font.Bold
    siz = Selection.Font.Size
    col = Selection.Font.Color
    hili = Selection.Range.HighlightColorIndex
    
    Selection.Font.Reset
    Selection.Font.Name = "Arial"
    Selection.Font.Italic = kur
    Selection.Font.Bold = fet
    Selection.Font.Size = siz
    Selection.Font.Color = col
    Selection.Range.HighlightColorIndex = hili

End Sub

Font is always Arial, hence no need to read that info...

The "Asian" is also in the "description" property of its non-Asian variant, the local name is simply "Standard".
:-(

Do you guys have any idea on how I can automatise my "cleaning"?

Thanks in advance!
MakeItSo

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Addendum:
VBA Selection Properties (as shown in the watch window) of such an asian formatted text (French) are:

Code:
LanguageDetected : False
LanguageID : wdFrench
LanguageIDFarEast : wdGerman
LanguageIDOther : wdFrench

Style
  -Description : "Font: (Asian) SimSun, (Standard) Times New Roman, 12 pt, German (Germany)...
  -LanguageID : wdGerman
  -LanguageIDFarEast : wdGerman
  -NameLocal : "Standard"

Remark: this is actually German; so the true English Word equivalents might be named "Default" or "Normal" rather than "Standard".

I sure as hell have no idea why Word would treat this as Asian, nor how on earth I could identify these asian formattings.
[sadeyes]

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Hi,

a similar thing happened to me as well.

At home I have Office97 on Windows98, both German. There I sometimes created Word documents for friends. When I completed these documents on the friends' PCs (which mostly ran Office2002 on WindowsXP), saved them there and re-opened them on my home PC, the styles of these documents many times showed the same strange description text as mentioned here by MakeItSo.

I have absolutely no idea what might cause this. I'm writing this post only because another strange thing has occured to me which I attribute to localization of Microsoft products. I hope describing it might provide a hint for the knowing in this forum. Here's the description.

In a German Word97 field names and field switches are also German, e.g. {Dateiname \* Kapitälchen}. In the latter German Word versions they are English, e.g. {Filename \* Caps}. As I still use Word97 at home I know some field names and switches by heart.
I am also in a German internet forum on Office. One of my answers delt with formatting a number. The field switch would have been \* Grundtext in WW97, but the OP had a higher version. So I looked on on the internet to find out the English name of this switch. The third hit on Google lead to the KB243014 article.
The American title of the KB243014 article is "If you open a Danish Word 2000 document that contains fields in the Danish version of Word 97, you receive the “Unknown switch argument” error message in the document". As I am in Germany the KB automatically translates its articles. And in this translation is the strange point which makes me write this post:

The article has a table with two columns. In the German trnslation the table's heading is Dänisch/Englisch (USA). But 50% of the table entries for Englis_h were German.
As no translation for Grundtext could be found, I switched to the original site by replacing the trailing /de by /en-us in the site's internet address. Even there most of the English field switches were German.

I attribute this to that I access this site from Germany.

Therefore I can only guess that deep within Microsoft keeps a vast database with all sorts of details of the MS software and all the translations in the languages of the localised versions.

And if an entry in this database is faulty, maybe such things described above must happen?

HTH.

Markus





 
Update.

With a little luck I just might have finally found something.
I cannot use it to remove asian formattings, but I just might be able to avoid them.

I'll write a little macro, run it before saving the DOC and ask a translator of my trust to also run this on his side before starting translation:
Code:
With Options
    .AddBiDirectionalMarksWhenSavingTextFile = False
    .ApplyFarEastFontsToAscii = False
    .ConvertHighAnsiToFarEast = False
End With

I hope this will do that trick. So far, I haven't found anything else that would work.
[hairpull2]

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Update.

Didn't work. With the new project, things are just the way they always are. Asian.
:-(

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top