View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Reference Libraries

You are referring to late binding, which doesn't bind to the application
type library at development/compile time, but makes multiple calls at
runtime.

Essentially, rather than setting a reference to the type library via
ToolsReferences, and then declaring an object of type Outlook.Application
or whatever, you create a generic Object variable and create that object
rather than just New.

You lose access to the application's object model and intellisens when you
do this, but there is another way, what I call Develop Early, Release Late.
An example is given (using Outlook) at
http://www.xldynamic.com/source/xld.EarlyLate.html

--

HTH

RP
(remove nothere from the email address if mailing direct)


"ben" (remove this if mailing direct) wrote in message
...
I use excel to control mailing of workbooks automatically using outlook.

So
in my excel file I have the Outlook 11.0 reference file added in which

is
associated with Outlook 2003, Unfortunately I have people using Outlook

2000
also which is using Outlook 9.0 reference library. When the excel workbook

is
run a machine with outlook 2000 every macro errors because the reference

to
the Outlook 11.0 library is not found. Is there a way to include backwards
compabtibilty here???????
Please help....
ben
--
When you lose your mind, you free your life.