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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accesing MS Outlook through Excel

Status
Not open for further replies.

waynerenaud

IS-IT--Management
May 21, 2003
80
AU
I have some code that I have been running everyday for over a year. Yesterday it started erroring. (Nothing new installed, nothing has changed in our environment) the only thing I can see different is windows update has loaded some SP2 hotfixes (I do not have SP2 installed). I have not tried to remove the hotfixes as when you go to add/remove them it says removing may affect the following programs...then gives a long list of programs.

The error I am now getting for each of the following lines (these are right at the top of the code) is:
Compile Error:
User-defined type not defined.

Dim myfolder As MAPIFolder
Dim oApp As Outlook.Application
Dim oNS As Outlook.NameSpace
Dim oF As MAPIFolder
Dim oMI As Outlook.MailItem

Going to help tells me I need to use a Type - End Type statement to define them, but I do not know what to define them as.... can anyone help or shed some light on this.
Many Thanks
Wayne
 
Its ok guys - I have fixed it.
For interest: It had lost the vba reference to the microsoft outlook 11.0 object library. Re-added the reference and everything is peachy again :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top