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

Inspector can't save the item



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 12th 06, 04:36 AM posted to microsoft.public.outlook.program_addins
tonyl
external usenet poster
 
Posts: 13
Default Inspector can't save the item


I am able to catch the itemsAdd. itemsChange event. I try to add some customized
properties in that item using the IMessage by calling item.get_MAPIObject((IUnknown
**)&spIMessage) .

After made the changes within the itemsAdd/itemsChange event, I use IMessage-SaveChanges(0),
and IMessage-Release() (if IMessage is not CComPtr, I call release).

- When I use the outlookspy to check my properties from the outlook main
window, it exists.
- When open that item window, the inspector, and check the imessage properties,
they all exist.
- When I made some changes on the item, eg. add comments, and click save
button, a popup window prompt that:
"Your changes could not be saved because you don't have permission to modify
some or all of the items in this folder. Do you want to save a copy of this
item in the default folder for the item?" YES/NO

How can I solve this? because from OOM, no API let me add the customized
properties (customized named properties), therefore, I call get_MAPIObject
and use MAPI call instead.

Regards,
Tony


Ads
  #2  
Old October 12th 06, 02:35 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Inspector can't save the item

Outlook UserProperties are MAPI named 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


"tonyl" wrote in message
m...

I am able to catch the itemsAdd. itemsChange event. I try to add some
customized properties in that item using the IMessage by calling
item.get_MAPIObject((IUnknown **)&spIMessage) .
After made the changes within the itemsAdd/itemsChange event, I use
IMessage-SaveChanges(0), and IMessage-Release() (if IMessage is not
CComPtr, I call release).
- When I use the outlookspy to check my properties from the outlook main
window, it exists.
- When open that item window, the inspector, and check the imessage
properties, they all exist.
- When I made some changes on the item, eg. add comments, and click save
button, a popup window prompt that:
"Your changes could not be saved because you don't have permission to
modify some or all of the items in this folder. Do you want to save a
copy of this item in the default folder for the item?" YES/NO

How can I solve this? because from OOM, no API let me add the customized
properties (customized named properties), therefore, I call get_MAPIObject
and use MAPI call instead.

Regards,
Tony



  #3  
Old October 12th 06, 05:53 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Inspector can't save the item

Do not call IMessage::SaveChanges; let OOM handle that (MailItem.Save) - you
just need to trick Outlook into thinking that it' been modified - something
like the following will do:

MailItem.Subject = MailItem.Subject

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"tonyl" wrote in message
m...

I am able to catch the itemsAdd. itemsChange event. I try to add some
customized properties in that item using the IMessage by calling
item.get_MAPIObject((IUnknown **)&spIMessage) .
After made the changes within the itemsAdd/itemsChange event, I use
IMessage-SaveChanges(0), and IMessage-Release() (if IMessage is not
CComPtr, I call release).
- When I use the outlookspy to check my properties from the outlook main
window, it exists.
- When open that item window, the inspector, and check the imessage
properties, they all exist.
- When I made some changes on the item, eg. add comments, and click save
button, a popup window prompt that:
"Your changes could not be saved because you don't have permission to
modify some or all of the items in this folder. Do you want to save a
copy of this item in the default folder for the item?" YES/NO

How can I solve this? because from OOM, no API let me add the customized
properties (customized named properties), therefore, I call get_MAPIObject
and use MAPI call instead.

Regards,
Tony




  #4  
Old October 13th 06, 10:17 AM posted to microsoft.public.outlook.program_addins
tonyl
external usenet poster
 
Posts: 13
Default Inspector can't save the item

Hello Dmitry,

Thanks alot. It works.

Regards,
Tony

Do not call IMessage::SaveChanges; let OOM handle that (MailItem.Save)
- you just need to trick Outlook into thinking that it' been modified
- something like the following will do:

MailItem.Subject = MailItem.Subject

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"tonyl" wrote in message
m...

I am able to catch the itemsAdd. itemsChange event. I try to add
some
customized properties in that item using the IMessage by calling
item.get_MAPIObject((IUnknown **)&spIMessage) .
After made the changes within the itemsAdd/itemsChange event, I use
IMessage-SaveChanges(0), and IMessage-Release() (if IMessage is
not
CComPtr, I call release).
- When I use the outlookspy to check my properties from the outlook
main
window, it exists.
- When open that item window, the inspector, and check the imessage
properties, they all exist.
- When I made some changes on the item, eg. add comments, and click
save
button, a popup window prompt that:
"Your changes could not be saved because you don't have permission to
modify some or all of the items in this folder. Do you want to save
a
copy of this item in the default folder for the item?" YES/NO
How can I solve this? because from OOM, no API let me add the
customized properties (customized named properties), therefore, I
call get_MAPIObject and use MAPI call instead.

Regards,
Tony



 




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
could not save item not implemented Sabu Outlook - Calandaring 0 September 18th 06 01:31 PM
Save New Item Lucas Rolim Outlook - Using Forms 0 July 27th 06 09:06 PM
add toolbar in inspector contact item Irene Outlook and VBA 1 February 24th 06 09:23 PM
Help! Inspector.Close is fired before Inspector.Activate handler finishes Sergey Anchipolevsky Add-ins for Outlook 8 February 9th 06 09:51 AM
How to find out which is the current item shown in the inspector? Michael Reukauff Add-ins for Outlook 1 January 25th 06 02:33 PM


All times are GMT +1. The time now is 01:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.