Create appointment from template

  • Thread starter Thread starter Fedor Kanukhin
  • Start date Start date
F

Fedor Kanukhin

I need to create new appontment from template and I do not want to publish my
form to any folder.

I can handle the NewInspector event for Instectors object (for example, the
cell in Calendar grin is double-clicked).

In the handling method, I do the following:
1. Take passed through parameter Inspector (Inspector1) and set
AppointmentItem for it (AppItem1).
2. Create new AppiontmentIten in Calendar folder using
CreateItemFromTemplate method (AppItem2).
3. Copy Start and End properties from AppItem1 to AppItem2.
4. Display AppItem2.

How can I close Inspector1 and do not save AppItem1?
 
Call the Close method:

myInspector.Close olDiscard

You should use Inspector.Activate not Inspectors.NewInspector to process the new item. NewInspector may provide only a weak reference to the item.

Why would you want to use a template, given that an unpublished form is not going to handle custom properties or code as a published form would?
 
Back
Top