A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Get Appointment Fields



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 8th 06, 02:02 PM posted to microsoft.public.outlook.program_vba
Ian Mackenzie
external usenet poster
 
Posts: 10
Default 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;


  #2  
Old March 8th 06, 03:22 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default 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;


  #3  
Old March 9th 06, 07:23 AM posted to microsoft.public.outlook.program_vba
Ian Mackenzie
external usenet poster
 
Posts: 10
Default 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;




  #4  
Old March 9th 06, 04:34 PM posted to microsoft.public.outlook.program_vba
Dave Kane [MVP - Outlook]
external usenet poster
 
Posts: 33
Default 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;






  #5  
Old March 9th 06, 05:59 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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?


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some fields cannot be edited on "All Fields" tab on Contact forms BR Outlook - Using Contacts 1 February 19th 06 08:54 PM
Merge fields not available KathrynBassett Outlook - Using Contacts 10 February 16th 06 12:37 AM
showing fields on the front appointment form Hugh Outlook - Using Forms 1 February 14th 06 04:08 PM
Recurring appointment/events linked to other recurring appointment uaewhitey Outlook - Calandaring 0 February 2nd 06 08:55 PM


All times are GMT +1. The time now is 08:18 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-2025 Outlook Banter.
The comments are property of their posters.