Get Appointment Fields

  • Thread starter Thread starter Ian Mackenzie
  • Start date Start date
I

Ian Mackenzie

Hi Guys... I get errors when I try access any of the following fields in the
calendar folder...
Other like the subject and body etc... work fine.

**Method 'Duration' not supported by automation object.

What can I do????

Thanks Ian
--------------------------------------------
var
outlookItem : OLEVariant;
count : integer;
begin
for count := 1 to currentFolder.items.count do
begin
outlookItem := currentFolder.items[count];

with dCalendar do
begin
Append;
outlookItem.allDayEvent;
outlookItem.Duration;
outlookItem.Location;
Post;
 
The most likely cause is that what you have is not an AppointmentItem at all, but some other kind of item. You CAN Check its Class property to confirm the item type.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
outlookItem.class

I get method 'class' not supported by automation object. However, if I open
the record, using the default Outlook window for that specific message type,
it opens these records in the Appointment Window, so they have to be
appointments???
The most likely cause is that what you have is not an AppointmentItem at
all, but some other kind of item. > You CAN Check its Class property to
confirm the item type.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Ian Mackenzie said:
Hi Guys... I get errors when I try access any of the following fields in
the
calendar folder...
Other like the subject and body etc... work fine.

**Method 'Duration' not supported by automation object.

What can I do????

Thanks Ian
--------------------------------------------
var
outlookItem : OLEVariant;
count : integer;
begin
for count := 1 to currentFolder.items.count do
begin
outlookItem := currentFolder.items[count];

with dCalendar do
begin
Append;
outlookItem.allDayEvent;
outlookItem.Duration;
outlookItem.Location;
Post;
 
It looks like you're using Delphi and there is not much expertise for that
here. In VBA you should always get a value for outlookItem.Class, which
would tell you whether the generic Item object you are working with is an
AppointmentItem or something else. Have you tried posting about this in a
Delphi newsgroup?
Ian Mackenzie said:
outlookItem.class

I get method 'class' not supported by automation object. However, if I
open the record, using the default Outlook window for that specific
message type, it opens these records in the Appointment Window, so they
have to be appointments???
The most likely cause is that what you have is not an AppointmentItem at
all, but some other kind of item. > You CAN Check its Class property to
confirm the item type.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Ian Mackenzie said:
Hi Guys... I get errors when I try access any of the following fields in
the
calendar folder...
Other like the subject and body etc... work fine.

**Method 'Duration' not supported by automation object.

What can I do????

Thanks Ian
--------------------------------------------
var
outlookItem : OLEVariant;
count : integer;
begin
for count := 1 to currentFolder.items.count do
begin
outlookItem := currentFolder.items[count];

with dCalendar do
begin
Append;
outlookItem.allDayEvent;
outlookItem.Duration;
outlookItem.Location;
Post;
 
Back
Top