A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Reading a Custom Appointment Item's Conflict Property in Item_Write Function



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 8th 06, 09:11 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 2
Default Reading a Custom Appointment Item's Conflict Property in Item_Write Function

Hi,

I am implementing a COM add-in in OL2003 which allows users to schedule
phone calls using an external soft-phone. I have created a custom form
which is based on the Appointment Item form, and have published it in
the Calendar folder, and so all of the appointment item properties are
available - including .Conflicts.

I want to check that a new item to be added to my calendar does not
conflict with an existing calendar entry, and I believe the best way to
do this is to use the VBScript in the form itself and manipulate the
code in the Item_Write event, checking as the item is about to be
saved. I thought about using the .Conflicts property as shown:

Function Item_Write()
MsgBox Conflicts.Count
if Conflicts.Count 0 Then
MsgBox "The schedule entry cannot conflict with an existing entry.
Please amend the start time"
Item_Write = false
end if

End Function

However, this doesn't seem to work. The first message box shows that
Conflicts.Count is always zero, whether there is a conflicting entry in
the calendar or not.

Does the conflicts property work before you save the item or does it
only check against other entries once it has been saved, i.e. when
Item_Write has closed? If this is the case, can anybody suggest any
other way to do it, short of loading every item in the calendar and
cycling through, checking the start and end times of every single
entry?

Thanks!

  #2  
Old August 8th 06, 11:04 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Reading a Custom Appointment Item's Conflict Property in Item_Writ

That's not what the Conflicts property does. It deals with copies of the item
created when multiple users save changes at the same time.

What you should be doing is checking the given time interval for overlapping
appointments by searching that interval; see
http://www.outlookcode.com/d/finddate.htm
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

" wrote:

Hi,

I am implementing a COM add-in in OL2003 which allows users to schedule
phone calls using an external soft-phone. I have created a custom form
which is based on the Appointment Item form, and have published it in
the Calendar folder, and so all of the appointment item properties are
available - including .Conflicts.

I want to check that a new item to be added to my calendar does not
conflict with an existing calendar entry, and I believe the best way to
do this is to use the VBScript in the form itself and manipulate the
code in the Item_Write event, checking as the item is about to be
saved. I thought about using the .Conflicts property


  #3  
Old August 9th 06, 07:53 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 2
Default Reading a Custom Appointment Item's Conflict Property in Item_Writ

Thanks for the heads up Sue. It really is not obvious (well to me
anyway) that the Conflicts property does not return conflicting date
and time appointments. Especially when Outlook even notifies you in the
Appointment window that the current date and time "conflicts" with
another appoinment.

Its a shame that I can't just tap off this information that Outlook
provides - but never mind, will try the Find and Restrict properties
instead.

Tom

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
outlook xp appointment conflict problem [email protected] Outlook - Calandaring 0 July 6th 06 11:09 AM
When a conflict occurs with appointment reoccurance THR Outlook - Calandaring 0 April 13th 06 04:46 AM
How to validate a Custom Property Page Jack Zhang Add-ins for Outlook 1 February 9th 06 08:22 PM
"Resize with form" property on custom controls Vaughan Outlook - Using Forms 2 February 6th 06 09:03 PM
Recurring appointment conflict Elan Outlook - Using Contacts 1 February 6th 06 10:35 AM


All times are GMT +1. The time now is 01:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.