
Run-Time error '424': object Required
I've posted a detailed discourse on using Find and Restrict with date fields at http://www.slipstick.com/dev/finddate.htm
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.slipstick.com/books/jumpstart.htm
Quote:
> Where can I find info about find and restricted? Proper syntax etc? I have
> looked and looked and can not find anything....
> Does that (I am not sure....) address the error?
> What I need to do is just to find out if I have any thing scheduled duing a
> given period say "4/21/03 5:30 PM" with a duration of 30 mins....
> Thanks!
> Penelope
> > Find (just like FindNext) will return an appointment item. If you need a
> > restrcted collection (Items object) use Restrict instead.
> > Dmitry Streblechenko (MVP)
> > http://www.dimastr.com/
> > OutlookSpy - Outlook, CDO
> > and MAPI Developer Tool
> > > I am trying to validate an appointment before I set it I want to see if
> I
> > > have any appoints during the time I want to request, but I get the
> > > Run-Time error '424': object Required error.
> > > what is wrong? How can I do this?
> > > Thanks!
> > > Penelope
> > > _______________________________ Code Snippet___________________________
> > > Sub TestAppt(ApptName)
> > > Dim appt_items As Items
> > > Dim c As Integer
> > > Dim strdate As String
> > > Set obj_Out = New Outlook.Application
> > > Set ns_Out = obj_Out.GetNamespace("MAPI")
> > > strdate$ = "#" & Now() & "#"
> > > Set appt_items = oCalendar.Items.Find("[Start]>= """ & strdate &
> """")
> > > '<< This is the line that generates the error.....
> > > ' will this actually test for a conflict if apptname is assigned
> > > ' strdate?
> > > c = appt_items.Count
> > > MsgBox c
> > > End Sub