View Single Post
  #3  
Old June 22nd 06, 05:53 PM posted to microsoft.public.outlook.program_vba
StoltHD
external usenet poster
 
Posts: 8
Default howto check if there already are an appointment on day/time

When I uses the code over and puts in two variables with dates (01.01.2006
and 31.12.2006) (i'm a norwegian so the date format differ from usa format,
but in the end it gives a readable format anyway)
the function returns all entries in my calendar before 2006, not the span I
want...

same happened when I used the string in a restrict method.

I tried this with the function because I allway want it to search the "this
year", but the year changes:
Set colcal = mpfCalendar.Items
stDateSp = "01.01." & Year(Date)
endDateSp = "31.12. " & Year(Date)
Set restrCalendar = DateSpan(colcal, stDateSp, endDateSp)

I can't understand why it does not returns anything but the appointments
before 2006
ie. my mothers birthday thats configured through a contact item.

best regards

jaran

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/d/finddate.htm for samples that show how to use the Find method to search for appointments within a date/time range.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"StoltHD" wrote in message news
I need some help with a little code that can search my calendar for excisting
appointments and if there are one thats on the same date that the one I'm
going to create, check if the timespan for the excisting appointment crash
with the new one.
i need 1/2 a hour between the appointments.
if there are a crash, I need to create a mail ( the subject and all that I
will figure out) and send it incl. to a cc.

I have the code for if the appointments are the same, based on billing
information w.m.
and the code for creating the appointment.
so the only thing I need are to figure uot how to compair the appointments...

best regards

jaran


Ads