Create appointment from template

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?
 
S

Sue Mosher [MVP-Outlook]

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top