![]() |
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 am adding one user property to an email in outlook 2007 using VSTO Addin.
When I close Outlook application It asks me, "Do you want to save changes?". Can I avoid this prompt? API I used : prop = MailItem.UserProperties.Add("TestProp" , Outlook.OlUserPropertyType.olText , false , Outlook.OlFormatText.olFormatTextText); prop.Value = "Test"; |
Ads |
#2
|
|||
|
|||
![]()
Sure, save the item using code.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Sandeep K" Sandeep wrote in message ... I am adding one user property to an email in outlook 2007 using VSTO Addin. When I close Outlook application It asks me, "Do you want to save changes?". Can I avoid this prompt? API I used : prop = MailItem.UserProperties.Add("TestProp" , Outlook.OlUserPropertyType.olText , false , Outlook.OlFormatText.olFormatTextText); prop.Value = "Test"; |
#3
|
|||
|
|||
![]()
Just a side note. I'm relatively new to Outlook programming but I got
into quite some trouble because of accessing the UserProperties directly. I would write: UserProperties props = MailItem.UserProperties; try { //Use props... //... MailItem.Save(); } finally { Marshall.ReleaseCOMObject(props); Marshall.ReleaseCOMObject(MailItem); } On 17 Aug., 16:47, Sandeep K Sandeep wrote: I am adding one user property to an email in outlook 2007 using VSTO Addin. |
#4
|
|||
|
|||
![]()
What problems did you have with your code?
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Tobias Böhm" wrote in message ... Just a side note. I'm relatively new to Outlook programming but I got into quite some trouble because of accessing the UserProperties directly. I would write: UserProperties props = MailItem.UserProperties; try { //Use props... //... MailItem.Save(); } finally { Marshall.ReleaseCOMObject(props); Marshall.ReleaseCOMObject(MailItem); } |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UserProperties and/or propertyaccessor on multiple access mailitem | Christian | Add-ins for Outlook | 2 | January 14th 08 03:22 PM |
Problem with Object Reference for MailItem | alexcraig | Outlook and VBA | 3 | January 6th 08 10:08 PM |
MailItem UserProperties in OWA (Outlook Web Access) | [email protected] | Outlook and VBA | 5 | April 23rd 07 11:18 AM |
Discarding the changes of mailItem object after saving it to the d | AtulSureka | Outlook - Using Forms | 6 | January 17th 07 02:50 PM |
MailItem.UserProperties property itself does not exist? (0x8004010F error) | Jeff | Outlook and VBA | 2 | October 17th 06 01:58 PM |