PC Review


Reply
Thread Tools Rate Thread

Appointment item Drag and Drop event

 
 
=?Utf-8?B?VGlt?=
Guest
Posts: n/a
 
      13th Jun 2005
I am required to create a custom form which updates a SQL Database each time
an appointment item is updated. Within the calendar view, when an appointment
is dragged and dropped to another user's calendar, I need to :

a) obtain the which user's calendar the appointment has been dropped into
b) update the sql database after the drag/drop event is completed.

Using the Item_write and Item_propetychange event, it appears that the
folderID property for the appointment does not update immediately after the
drop. The folder id property only changes when the appointment item is
subsequently changed. Is there another approach i should be taking?

Any help to point me in the right direction is greatly appreciated.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      14th Jun 2005
The AppointmentItem object does not have a FolderID property, but the parent
MAPIFolder object (available through AppointmentItem.Parent) does. You can
also get the folder through the ActiveExplorer.CurrentFolder property.

Regardless, I know what you mean - even the Parent folder is that of the
source during Item_Write, not the destination.

There is only two ways around this that I can think of:

1. Pair your custom form with an Outlook VBA macro or COM Add-In that traps
the Explorer.BeforeItemPaste event. This actually fires before you choose
"Copy" or "Move To" from the drag and drop action options menu, but the
Target argument does correctly point to the source of the drag and drop. You
can add code to esape this event if the Target MAPIFolder object is not one
you are concerned with, and write to your database if it is. Note that you
can get a reference to the copied AppointmentItem object by setting it to the
ClipBoardContent argument's Selection property, and make further changes to
the item if required (like logging that it was copied, from where, etc.).

2. If the deployment issues with the above approach (although not so bad
with COM Add-Ins as it is with Outlook VBA macro projects) are not palatable,
the best method is to develop a server side Event Sink if you are using
Microsoft Exchange Server. These sinks can be defined to fire whenever
something changes in the entire server, or for specific Mailboxes or folders,
and your code can write to a database or do something else.

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"Tim" wrote:

> I am required to create a custom form which updates a SQL Database each time
> an appointment item is updated. Within the calendar view, when an appointment
> is dragged and dropped to another user's calendar, I need to :
>
> a) obtain the which user's calendar the appointment has been dropped into
> b) update the sql database after the drag/drop event is completed.
>
> Using the Item_write and Item_propetychange event, it appears that the
> folderID property for the appointment does not update immediately after the
> drop. The folder id property only changes when the appointment item is
> subsequently changed. Is there another approach i should be taking?
>
> Any help to point me in the right direction is greatly appreciated.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Turn Off Drag and Drop Appointment Editing JeffreyBee Microsoft Outlook Calendar 1 6th Jan 2009 06:21 PM
Appointment location restricted from drag and drop =?Utf-8?B?Qm9iIENvb2s=?= Microsoft Outlook Calendar 0 5th Sep 2006 10:44 PM
Drag and drop item =?Utf-8?B?aG93Z29vZGlzdGhpcw==?= Microsoft Powerpoint 1 24th Sep 2005 01:25 PM
Problem detecting "Drag and Drop" of Appointment Item =?Utf-8?B?QW5keUs=?= Microsoft Outlook VBA Programming 2 30th Dec 2003 06:56 AM
Item Drag Drop Champika Nirosh Microsoft C# .NET 0 7th Nov 2003 05:42 AM


Features
 

Advertising
 

Newsgroups
 


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