TWordApplicationWindowActivate not found in Word_tlb

Add-in Express™ Support Service
That's what is more important than anything else

TWordApplicationWindowActivate not found in Word_tlb
 
Yossi Mazal Tov


Guest


hi there.
if i import the outlook 12 object library i can not found the
TWordApplicationWindowActivate object + all the events that come with it.

i want to upgrade the ocx\****2000 to the newest tlb version.
but then i stuck with this problem

can i upgrade to the newest office tlb at all?
if so - what i sould do with this?

Yossi
Posted 29 Mar, 2013 12:35:00 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Yossi,

You need to import the Microsoft Word 12.0 Object Library (not Outlook) to get Delphi class wrappers for Word. Then you will be able to use the new classes in your add-in's code by type casting Office 2000 interfaces to the new interfaces from the Office 2007 type library.
Posted 01 Apr, 2013 05:49:06 Top
Yossi Mazal Tov


Guest


hi dmitry
thanks for the both replay.

the word "outlook" was just mistake.
i import all Microsoft object 12.0....
includ word, outlook, excel....

but the event "TWordApplicationWindowActivate" was not found there.
all the class "TWordApplication" that present in ocx\word2000\xp is no longer present

and some of the add-in-express activity are depend on it.

i'm not shure i need it at-all (the conversion to newest ms objects).
but there some consts or parameters like "PowerPoint_tlb.ppSaveAsDefault" that dont include in the 2000 files +more like this. and i dont no where it will crash my app.

Yossi.
Posted 01 Apr, 2013 08:10:48 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Yossi,

but the event "TWordApplicationWindowActivate" was not found there.


This may be a Delphi issue, I also noticed that sometimes Delphi does not create class wrappers and events when importing a type library.

and some of the add-in-express activity are depend on it.


Yes, you are right, Add-in Express code is built using the Office 2000 type libraries.

i'm not shure i need it at-all (the conversion to newest ms objects).


I would suggest using the standard approach, i.e. Office 2000 as the minimal supported version. In this case your add-in should work properly in all versions starting from 2000. If you need to access some methods or objects introduced in higher Office versions you can use the late binding to do so, for example:
OleVariant(IWordDoc).CallNewMethod();
Posted 01 Apr, 2013 10:56:54 Top
Yossi Mazal Tov


Guest


thanks
Posted 01 Apr, 2013 13:21:50 Top