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

User-defined type not defined error

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
I received the code (down below) from another forum for sending
an appointment to someone eles'e calendar. I keep getting
the following error:

Compile error:

User-defined type not defined

The research I have done, I think has to do with a
module but I do not understand. Can anyone assist me as to
how to get the code to work?

Code:
Dim outMail As Outlook.AppointmentItem

Set outMail = Outlook.CreateItem(olAppointmentItem)
outMail.Subject = "A new appointment has been booked for me"
outMail.Location = "Nowhere"
outMail.MeetingStatus = olMeeting
outMail.Start = #2/8/2008# & " " & #9:15:00 AM#
outMail.End = #2/8/2008# & " " & #10:15:00 AM#
outMail.RequiredAttendees = "Email addresses for attendees"
outMail.Body = "No Reason"
outMail.Send

Set outMail=Nothing
 
I found out to add An Outlook Reference and it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top