Visit our Sponsor   Visit our Sponsor
delphi3000.com - the free delphi knowledge platform
delphi3000.com - the free delphi knowledge platform
Have a look at your member-status

connecting people's knowledge


  - Recent ArticlesRSS feed for Recent Articles on delphi3000.com
  - List of All Articles
  - Top Viewed Articles
  - Articles (+Attachem.)
  - Articles Of Interest
  - Categories
  - Top Uploader
  - Search
  - Index

  - My Home
  - Submit an Article
  - My Articles
  - My Personal Data
  - My Bookmarks
  - Activities
  - Login/Logout

  - Sign Up
  - Why Sign Up
  - Newsletter

  - Press
  - Advertise

  - Contact
  - Feedback





Community
Borland
ClubeDelphi
Dr. Bob
UK-BUG
Delphi Meetings
Planeta Delphi







Startblatt.de






Share this article with friendsShare this article with friends
Rate this articleRate this article - to keep the quality of delphi3000.com !
Comment this article or read through previous comments (0)


language for MS OfficeGo to Mike Shkolnik's websiteFormat this article printer-friendly!Bookmark function is only available for registered users!
Product:
Delphi all versions
Category:
OLE
Skill Level:
Scoring:
Last Update:
03/26/2003
Search Keys:
delphi delphi3000 article borland vcl code-snippet MS Office Word Language Country detect read get
Times Scored:
1
Visits:
3168
Uploader: Mike Shkolnik
Company: Scalabium Software
Reference: http://www.scalabium.com/faq/dct0149.htm
 
Question/Problem/Abstract:
How can I read the default language of installed MS Office application?
Answer:



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;





Please rate this article!
Skill level:
BeginnerExpert

Useful:
No!Very!

Overall rating:
PoorExcellent



Comments to this article
Write a new comment













 
Sign up to consume product discounts for Bronze memberships !

read more


  Visit our Sponsor

 

  Community Ad of
M. Maes
 
   














 







     
  Copyright © 2000 - 2007 delphi3000.com - All rights reserved. Terms of use. || Privacy
delphi3000.com is a service by bluestep.com IT-Services GmbH (Vienna)