Scalabium Software

SMReport Autogenerated
Knowledge for your independence'.
Home Delphi and C++Builder tips


#149: To detect a language for installed MS Office

Question:
how can I read the default language of installed MS Office application?

Answer:
you may initialize Word.Application instance and read a CountryID:

var
  word: Variant;
begin
  word := CreateOLEObject('Word.Application');
  CountryID := word.System.Country;
  word.Quit;
  word := UnAssigned;
end;

After that check this CountryID with next values:
wdUS = $00000001;
wdCanada = $00000002;
wdLatinAmerica = $00000003;
wdNetherlands = $0000001F;
wdFrance = $00000021;
wdSpain = $00000022;
wdItaly = $00000027;
wdUK = $0000002C;
wdDenmark = $0000002D;
wdSweden = $0000002E;
wdNorway = $0000002F;
wdGermany = $00000031;
wdPeru = $00000033;
wdMexico = $00000034;
wdArgentina = $00000036;
wdBrazil = $00000037;
wdChile = $00000038;
wdVenezuela = $0000003A;
wdJapan = $00000051;
wdTaiwan = $00000376;
wdChina = $00000056;
wdKorea = $00000052;
wdFinland = $00000166;
wdIceland = $00000162;


Published: March 26, 2003

See also
 
Clarion to Text converter
Excel Reader (dll)
Paradox to Text converter
ABA Document Convert
DBExport tools
Paradox Viewer
Viewer for TNEF-files (winmail.dat)
Paradox to MS Access converter
ExcelFile Viewer
Word Web-stream
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2024, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMReport Autogenerated