Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Delphi: ActiveX/СОМ/CORBA > Как узнать версию MS Word?


Автор: Pakshin A. S. 10.11.2004, 20:12
Код

{ ... } 
MsWord := CreateOleObject('Word.Basic'); 
try 
  {Return Application Info. This call is the same for English and  
   French Microsoft Word.} 
  Lang := MsWord.AppInfo(Integer(16)); 
except 
  try 
    {For German Microsoft Word the procedure name is translated} 
    Lang := MsWord.AnwInfo(Integer(16)); 
  except 
    try 
      {For Swedish Microsoft Word the procedure name is translated} 
      Lang := MsWord.PrgmInfo(Integer(16)); 
    except 
      try 
        {For Dutch Microsoft Word the procedure name is translated} 
        Lang := MsWord.ToepasInfo(Integer(16)); 
      except 
        {If this procedure does not exist there is a different translation 
           of Microsoft Word} 
        ShowMessage('Microsoft Word version is not German, French, Dutch, Swedish 
             or English.'); 
        Exit; 
      end; 
    end; 
  end; 
end; 
ShowMessage(Lang); 
{ ... } 

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)