Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / January 2004

Tip: Looking for answers? Try searching our database.

Dim Inspector

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
StudioTwo - 22 Jan 2004 15:47 GMT
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
Ken Slovak - [MVP - Outlook] - 22 Jan 2004 15:54 GMT
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 Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hello,
> I am converting some existing VBA Code into a COM Add-In for use by
[quoted text clipped - 14 lines]
> TIA
> Stephen
StudioTwo - 23 Jan 2004 15:19 GMT
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

> Make sure you have a reference set to Outlook in your project
> references. FWIW it's better coding practice to fully qualify your
[quoted text clipped - 6 lines]
> Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.