Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

outlook 12.0 object library

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Hi,

I am having a problem with a file I edited at home.
I use excel 2007 at home and edited a report for hours yesterday and it works fine at home without any problems,
however now I am back at work and when i open the file i get a "error loading dll" error, i cant view my coding in the module, it just comes up with the dll error.

I have tried saving the file as .xls at home and sending to myself to view, and still wont work.

I looked at the references in vba and the outlook 12.0 comes up i can uncheck it and select the 11.0 version however when I click ok it comes up with the error again, if i then check the references again the 12.0 is still checked.

this only happens on this particular file.

anyone know how i can get this to work.

Rob.

Hope this is of use, Rob.[yoda]
 
You can use late binding, that is:

[tt]Dim ol As Object

Set ol=CreateObject("Outlook.Application")[/tt]

Make sure that you change all outlook constants to actual values, for example, olFolder is 2.
 
hi,
i am not sure how that will help as i stated

i cant view my coding in the module, it just comes up with the dll error.

are you sure this response was for me

Hope this is of use, Rob.[yoda]
 
I am certain. Under Tools->References, uncheck the reference to the Outlook Object Library and then use late binding. It is quite a common problem.
 
i cant remove the reference every time I try to uncheck it comes back as stated in original post.



Hope this is of use, Rob.[yoda]
 
You are right, I also missed the reference to Excel. This is an Access forum.

Can you uncheck the reference in your home copy and change to late binding before saving the file? Alternatively, can you open the file with security that prevents the code running or hold the shift key down when opening the file to prevent macros running?

You could also try the Excel forums.
 
sorry posted in wrong forum, did look properly, have tried with shift key and still no joy.

Hope this is of use, Rob.[yoda]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top