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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to modify an AppointmentItem?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 12th 06, 09:11 AM posted to microsoft.public.outlook.program_addins
OctopusThu
external usenet poster
 
Posts: 25
Default How to modify an AppointmentItem?

I got an AppointmentItem from an MAPIFolder and try to modify its fields. But
an exception occurred telling me that I had got no privilege to do this......

public void modifyItem(AppointmentItem item, CalItem calItem)
{
......
item.End = calItem.endTime; (Exception)
......
}

Ads
  #2  
Old December 12th 06, 03:17 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to modify an AppointmentItem?

Where is this MAPIFolder? Is it in a PST file, your Exchange mailbox, a
delegate mailbox, public folder?

What are your permissions on that folder?

Can you perform any other operations on that appointment item? What is the
exact error?

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


"OctopusThu" wrote in message
...
I got an AppointmentItem from an MAPIFolder and try to modify its fields.
But
an exception occurred telling me that I had got no privilege to do
this......

public void modifyItem(AppointmentItem item, CalItem calItem)
{
......
item.End = calItem.endTime; (Exception)
......
}


  #3  
Old December 12th 06, 05:46 PM posted to microsoft.public.outlook.program_addins
OctopusThu
external usenet poster
 
Posts: 25
Default How to modify an AppointmentItem?

My Outlook was not of an English version, but the exception should be meaning:
"You do not have the authority(privilege) to move(modify) the item."

The MAPIFolder was the default folder acquired by:

Outlook.MAPIFolder defaultFolder =
applicationObject.GetNamespace("MAPI").GetDefaultF older(Outlook.OlDefaultFolders.olFolderCalendar);

So I think it should be a public one.

By the way, I can create new AppointmentItem in this folder with:

item = (Outlook.AppointmentItem)
defaultFolder.Items.Add(Outlook.OlItemType.olAppoi ntmentItem);


"Ken Slovak - [MVP - Outlook]" wrote:

Where is this MAPIFolder? Is it in a PST file, your Exchange mailbox, a
delegate mailbox, public folder?

What are your permissions on that folder?

Can you perform any other operations on that appointment item? What is the
exact error?

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


"OctopusThu" wrote in message
...
I got an AppointmentItem from an MAPIFolder and try to modify its fields.
But
an exception occurred telling me that I had got no privilege to do
this......

public void modifyItem(AppointmentItem item, CalItem calItem)
{
......
item.End = calItem.endTime; (Exception)
......
}



  #4  
Old December 12th 06, 07:42 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to modify an AppointmentItem?

That would be your default Calendar folder, either in a mailbox or a PST
file. If it's your own default folder you certainly should have permissions
on it. You can check on the permissions by selecting Folder List for the
Navigation Pane display and right-clicking on the Calendar folder and
selecting Properties. Go to the Permissions tab and see what permissions
your logon has.

Does this happen with all appointment items or only some? The only times
I've seen that sort of error message was if the user didn't have rights to
edit items in the folder.

Can you modify items in that folder manually, using the user interface?

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


"OctopusThu" wrote in message
...
My Outlook was not of an English version, but the exception should be
meaning:
"You do not have the authority(privilege) to move(modify) the item."

The MAPIFolder was the default folder acquired by:

Outlook.MAPIFolder defaultFolder =
applicationObject.GetNamespace("MAPI").GetDefaultF older(Outlook.OlDefaultFolders.olFolderCalendar);

So I think it should be a public one.

By the way, I can create new AppointmentItem in this folder with:

item = (Outlook.AppointmentItem)
defaultFolder.Items.Add(Outlook.OlItemType.olAppoi ntmentItem);


  #5  
Old December 13th 06, 04:26 AM posted to microsoft.public.outlook.program_addins
OctopusThu
external usenet poster
 
Posts: 25
Default How to modify an AppointmentItem?

Hi, Ken. Thanks for your help so far.
I've done some further tests and discovered that ONLY the "Start" and "End"
fields of an RECURRING AppointmentItem cannot be modified. Other fields of a
recurring item and all fields of a non-recurring item can be modified.
Are there possibilities that I can modify the "Start" and "End" fields?

"Ken Slovak - [MVP - Outlook]" wrote:

That would be your default Calendar folder, either in a mailbox or a PST
file. If it's your own default folder you certainly should have permissions
on it. You can check on the permissions by selecting Folder List for the
Navigation Pane display and right-clicking on the Calendar folder and
selecting Properties. Go to the Permissions tab and see what permissions
your logon has.

Does this happen with all appointment items or only some? The only times
I've seen that sort of error message was if the user didn't have rights to
edit items in the folder.

Can you modify items in that folder manually, using the user interface?

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


"OctopusThu" wrote in message
...
My Outlook was not of an English version, but the exception should be
meaning:
"You do not have the authority(privilege) to move(modify) the item."

The MAPIFolder was the default folder acquired by:

Outlook.MAPIFolder defaultFolder =
applicationObject.GetNamespace("MAPI").GetDefaultF older(Outlook.OlDefaultFolders.olFolderCalendar);

So I think it should be a public one.

By the way, I can create new AppointmentItem in this folder with:

item = (Outlook.AppointmentItem)
defaultFolder.Items.Add(Outlook.OlItemType.olAppoi ntmentItem);



  #6  
Old December 13th 06, 05:05 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to modify an AppointmentItem?

For any appointment check for IsRecurring. If it is recurring use the
GetRecurrencePattern method to get the RecurrencePattern for the
appointment. Never reference that if it's not recurring, it will convert the
appointment into a recurring one.

Once you have the pattern you can get the master appointment as
RecurrencePattern.Parent. To get a specific occurrence use the
GetOccurrence(StartDate) method. Iterate the Exceptions collection to find
any existing exceptions and deleted occurrences. With the occurrence you can
then change start/end, which will add that appointment to the Exceptions
collection when you save the changes.

Look in the VBA Help for information and code snippets on working with those
methods and properties.

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


"OctopusThu" wrote in message
...
Hi, Ken. Thanks for your help so far.
I've done some further tests and discovered that ONLY the "Start" and
"End"
fields of an RECURRING AppointmentItem cannot be modified. Other fields of
a
recurring item and all fields of a non-recurring item can be modified.
Are there possibilities that I can modify the "Start" and "End" fields?


  #7  
Old December 14th 06, 07:13 AM posted to microsoft.public.outlook.program_addins
OctopusThu
external usenet poster
 
Posts: 25
Default How to modify an AppointmentItem?

I got it. Thank you very much, Ken.

"Ken Slovak - [MVP - Outlook]" wrote:

For any appointment check for IsRecurring. If it is recurring use the
GetRecurrencePattern method to get the RecurrencePattern for the
appointment. Never reference that if it's not recurring, it will convert the
appointment into a recurring one.

Once you have the pattern you can get the master appointment as
RecurrencePattern.Parent. To get a specific occurrence use the
GetOccurrence(StartDate) method. Iterate the Exceptions collection to find
any existing exceptions and deleted occurrences. With the occurrence you can
then change start/end, which will add that appointment to the Exceptions
collection when you save the changes.

Look in the VBA Help for information and code snippets on working with those
methods and properties.

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


"OctopusThu" wrote in message
...
Hi, Ken. Thanks for your help so far.
I've done some further tests and discovered that ONLY the "Start" and
"End"
fields of an RECURRING AppointmentItem cannot be modified. Other fields of
a
recurring item and all fields of a non-recurring item can be modified.
Are there possibilities that I can modify the "Start" and "End" fields?



 




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
How to efficiently get an AppointmentItem by its EntryID? OctopusThu Add-ins for Outlook 2 December 8th 06 04:39 PM
TaskItem and AppointmentItem formated body razvantim Outlook and VBA 10 November 10th 06 08:55 PM
help: AppointmentItem.copy fail problem meokey Outlook and VBA 2 October 31st 06 04:07 PM
How can i make AppointmentItem not editable in the calendar? [email protected] Outlook - Using Forms 0 September 19th 06 07:59 AM
AppointmentItem question (2003) Dana DeLouis Outlook and VBA 1 January 18th 06 06:13 PM


All times are GMT +1. The time now is 08:43 PM.


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.