Dim Inspector

  • Thread starter Thread starter StudioTwo
  • Start date Start date
S

StudioTwo

Hello,
I am converting some existing VBA Code into a COM Add-In for use by
Outlook 2000. I am using Office 2000 Developer Edition.

My routine saves the current message (in msg format) into a specific
directory on our network.

I was hoping to use my existing code, but the compiler refuses to
accept the following:

Dim MyInspector As Inspector
Dim MyItem As MailItem

"User Defined Type Not Defined" is the reason. Could anyone give me a
few pointers?

TIA
Stephen
 
Make sure you have a reference set to Outlook in your project
references. FWIW it's better coding practice to fully qualify your
declarations. For example, Dim oMail As Outlook.MailItem and so on.
 
Ken,
Thank you so much. I had already tried using "Outlook.MailItem", but
no effect.

The reason i was having difficulty was due to the "project references"
(as you correctly pointed out).

In Office 2000 developer, these should be checked as follows:
VBA-> Tools -> References -> Outlook 9.0 Object Library
VBA-> Tools -> References -> Office 9.0 Object Library

Thanks for putting me right.
There whole thing now compiles - no idea if it will work though..

Thanks again (have a great weekend)
Stephen
 
Back
Top