View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Alan Moseley Alan Moseley is offline
external usenet poster
 
Posts: 75
Default Reference Library Upgrading

Your answer is perfectly good, providing that you don't need to hook into an
Outlook event. I cannot seem to find any sample code which describes how one
would, for example, act upon an ItemSend event when you have late-bound your
Outlook Application object.

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Jacob Skaria" wrote:

Instead of referencing; use CreateObject function which creates and returns
a reference to an Automation object

Dim OutlookApp As Object
Set OutlookApp = CreateObject("Outlook.Application")

http://msdn.microsoft.com/en-us/libr...7z(VS.85).aspx

If this post helps click Yes
---------------
Jacob Skaria


"J Streger" wrote:

Is there any way to stop Excel 2007 from upgrading reference libraries? I
know probably not but I am getting fed up with the knowledge that I cannot
utilize the MS Outlook library in any sheets that may be used by both 2003
and 2007 (Currently we have both where I work, which is HIGHLY annoying).

To explain, if I create a sheet in 2003, I can add MS Outlook Lib 11.0. If a
2007 person opens it, it permanently upgrades to library to 12.0. Then if a
2003 opens the sheet, the code fails and the reference needs to be reset.
This is what I want to stop. It's especially bad with shared sheets as it
causes a fatal corruption in the file, since the library is still updated
even if the sheet is shared. VBA gets stripped out in order to recover it in
2003.

So any solutions out there?

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003