Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Get Appointment Fields (http://www.outlookbanter.com/outlook-vba/7569-get-appointment-fields.html)

Ian Mackenzie March 8th 06 02:02 PM

Get Appointment Fields
 
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;



Sue Mosher [MVP-Outlook] March 8th 06 03:22 PM

Get Appointment Fields
 
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Ian Mackenzie" wrote in message ...
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;



Ian Mackenzie March 9th 06 07:23 AM

Get Appointment Fields
 
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Ian Mackenzie" wrote in message
...
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;





Dave Kane [MVP - Outlook] March 9th 06 04:34 PM

Get Appointment Fields
 
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" wrote in message
...
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Ian Mackenzie" wrote in message
...
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;







Ken Slovak - [MVP - Outlook] March 9th 06 05:59 PM

Get Appointment Fields
 
Unless Dmitry sees it, he's the Delphi man.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Dave Kane [MVP - Outlook]" wrote in message
...
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?




All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com