![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |