Custom Appointment Form - Setting Duration to 0 Minutes

G

Guest

I am playing around with forms. I would like to create a custom form that
has a default duration of 0 minutes. However, when I add the field to the
form, it is locked and cannot be modified. I have successfully added a Show
Time field, and the Outlook Date and Time controls, but the duration is
holding me up.

What am I doing wrong (other than the fact that I am not a programmer and am
just dragging and dropping stuff onto a screen)?

In addition, how do I get my custom forms to appear in the default list of
forms to choose from when selecting "New"?
 
K

Ken Slovak - [MVP - Outlook]

Although AppointmentItem.Duration is a read/write field the Duration field
you can add to a form is a calculated field based on End - Start. You can
use code in the Item_Open event to test for a new item (EntryID = "") and if
it's a new item use the code to set Duration to 0.

The code in the Object Browser Help for Duration shows how to set that
property, you first set Start and then set Duration, which ends up also
setting End. You can also make a form look that way by setting Start and End
to the same date/time, but of course that would be fixed values so not very
flexible.
 

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