![]() |
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
|
|||
|
|||
![]()
1) I have seen other MVP's say that when a UserProperty is added the item
should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
Ads |
#2
|
|||
|
|||
![]()
1.Yes, you can set any number of properties before calling Save
2. Provide the relevant snippets of your code and indicate what exactly does not work. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... 1) I have seen other MVP's say that when a UserProperty is added the item should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
#3
|
|||
|
|||
![]()
Dmitry
Please use my comment for your product OutlookSpy: WOW! It does what it says! As hard as it was to articulate the differences between two systems with your tool I think I may have found something, finally. Dmitry although it does require some explaination - looking at the IMessage GetProps tab I see lots of differences in number of properties with each Appointment item and values. As I suspected my userproperties have no values in the system/version that doesn't work. one property that is interesting is http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/urn:schemas:calendar:version. BTW the value is 2.0. I don't see this one on systems that do work for my Outlook Addin. Do you know what its for? Can you offer an explanation why aren't my properties storing values? Is it possible my properties somehow depend on the property offset? "Dmitry Streblechenko" wrote: 1.Yes, you can set any number of properties before calling Save 2. Provide the relevant snippets of your code and indicate what exactly does not work. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... 1) I have seen other MVP's say that when a UserProperty is added the item should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
#4
|
|||
|
|||
![]()
:-)
What is your code that sets the propeties and saves the item? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Dmitry Please use my comment for your product OutlookSpy: WOW! It does what it says! As hard as it was to articulate the differences between two systems with your tool I think I may have found something, finally. Dmitry although it does require some explaination - looking at the IMessage GetProps tab I see lots of differences in number of properties with each Appointment item and values. As I suspected my userproperties have no values in the system/version that doesn't work. one property that is interesting is http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/urn:schemas:calendar:version. BTW the value is 2.0. I don't see this one on systems that do work for my Outlook Addin. Do you know what its for? Can you offer an explanation why aren't my properties storing values? Is it possible my properties somehow depend on the property offset? "Dmitry Streblechenko" wrote: 1.Yes, you can set any number of properties before calling Save 2. Provide the relevant snippets of your code and indicate what exactly does not work. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... 1) I have seen other MVP's say that when a UserProperty is added the item should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
#5
|
|||
|
|||
![]()
Ok here's what I got:
Microsoft.Office.Interop.Outlook.AppointmentItem appt; string propertyName = "MyProp"; // if the property doesn't exist if(!appt.UserProperties.Find(propertyName,Type.Mis sing)) { appt.UserProperties.Add(propertyName,Microsoft.Off ice.Interop.Outlook.OlUserPropertyType.olText, Type.Missing, Type.Missing); } appt.UserProperties[propertyName].Value = value; appt.Save(); Steve "Dmitry Streblechenko" wrote: :-) What is your code that sets the propeties and saves the item? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Dmitry Please use my comment for your product OutlookSpy: WOW! It does what it says! As hard as it was to articulate the differences between two systems with your tool I think I may have found something, finally. Dmitry although it does require some explaination - looking at the IMessage GetProps tab I see lots of differences in number of properties with each Appointment item and values. As I suspected my userproperties have no values in the system/version that doesn't work. one property that is interesting is http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/urn:schemas:calendar:version. BTW the value is 2.0. I don't see this one on systems that do work for my Outlook Addin. Do you know what its for? Can you offer an explanation why aren't my properties storing values? Is it possible my properties somehow depend on the property offset? "Dmitry Streblechenko" wrote: 1.Yes, you can set any number of properties before calling Save 2. Provide the relevant snippets of your code and indicate what exactly does not work. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... 1) I have seen other MVP's say that when a UserProperty is added the item should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
#6
|
|||
|
|||
![]()
Try the following instead:
UserProperty prop = appt.UserProperties.Find(propertyName,Type.Missing ); if (prop == null) prop = appt.UserProperties.Add(propertyName, OlUserPropertyType.olText, Type.Missing, Type.Missing); prop.Value = value; appt.Save; Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Ok here's what I got: Microsoft.Office.Interop.Outlook.AppointmentItem appt; string propertyName = "MyProp"; // if the property doesn't exist if(!appt.UserProperties.Find(propertyName,Type.Mis sing)) { appt.UserProperties.Add(propertyName,Microsoft.Off ice.Interop.Outlook.OlUserPropertyType.olText, Type.Missing, Type.Missing); } appt.UserProperties[propertyName].Value = value; appt.Save(); Steve "Dmitry Streblechenko" wrote: :-) What is your code that sets the propeties and saves the item? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Dmitry Please use my comment for your product OutlookSpy: WOW! It does what it says! As hard as it was to articulate the differences between two systems with your tool I think I may have found something, finally. Dmitry although it does require some explaination - looking at the IMessage GetProps tab I see lots of differences in number of properties with each Appointment item and values. As I suspected my userproperties have no values in the system/version that doesn't work. one property that is interesting is http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/urn:schemas:calendar:version. BTW the value is 2.0. I don't see this one on systems that do work for my Outlook Addin. Do you know what its for? Can you offer an explanation why aren't my properties storing values? Is it possible my properties somehow depend on the property offset? "Dmitry Streblechenko" wrote: 1.Yes, you can set any number of properties before calling Save 2. Provide the relevant snippets of your code and indicate what exactly does not work. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... 1) I have seen other MVP's say that when a UserProperty is added the item should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
#7
|
|||
|
|||
![]()
Thank you for the reply unfortunately it still doesn't work on all machines.
However the changes didn't break anything on previously working machines. First let me apologize for double posting Ken Slovak politely yelled at me for also posting in the VSTO newsgroup. Ken my apologies. Dmitry - I noticed your app which works perfectly well on several machines I'm working with for testing uses a different interface. Some sample code also on outlookcode.com by Helmut Obertanner that was inspired by yourself that doesn't use the Outlook Object Model. Is this another potentially better more generic approach? Thanks Steve "Dmitry Streblechenko" wrote: Try the following instead: UserProperty prop = appt.UserProperties.Find(propertyName,Type.Missing ); if (prop == null) prop = appt.UserProperties.Add(propertyName, OlUserPropertyType.olText, Type.Missing, Type.Missing); prop.Value = value; appt.Save; Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Ok here's what I got: Microsoft.Office.Interop.Outlook.AppointmentItem appt; string propertyName = "MyProp"; // if the property doesn't exist if(!appt.UserProperties.Find(propertyName,Type.Mis sing)) { appt.UserProperties.Add(propertyName,Microsoft.Off ice.Interop.Outlook.OlUserPropertyType.olText, Type.Missing, Type.Missing); } appt.UserProperties[propertyName].Value = value; appt.Save(); Steve "Dmitry Streblechenko" wrote: :-) What is your code that sets the propeties and saves the item? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Dmitry Please use my comment for your product OutlookSpy: WOW! It does what it says! As hard as it was to articulate the differences between two systems with your tool I think I may have found something, finally. Dmitry although it does require some explaination - looking at the IMessage GetProps tab I see lots of differences in number of properties with each Appointment item and values. As I suspected my userproperties have no values in the system/version that doesn't work. one property that is interesting is http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/urn:schemas:calendar:version. BTW the value is 2.0. I don't see this one on systems that do work for my Outlook Addin. Do you know what its for? Can you offer an explanation why aren't my properties storing values? Is it possible my properties somehow depend on the property offset? "Dmitry Streblechenko" wrote: 1.Yes, you can set any number of properties before calling Save 2. Provide the relevant snippets of your code and indicate what exactly does not work. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... 1) I have seen other MVP's say that when a UserProperty is added the item should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
#8
|
|||
|
|||
![]()
So what exactly happens when you run that code? Do you see an empty property
with the right name but no value in OutlookSpy when you click IMessage? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Thank you for the reply unfortunately it still doesn't work on all machines. However the changes didn't break anything on previously working machines. First let me apologize for double posting Ken Slovak politely yelled at me for also posting in the VSTO newsgroup. Ken my apologies. Dmitry - I noticed your app which works perfectly well on several machines I'm working with for testing uses a different interface. Some sample code also on outlookcode.com by Helmut Obertanner that was inspired by yourself that doesn't use the Outlook Object Model. Is this another potentially better more generic approach? Thanks Steve "Dmitry Streblechenko" wrote: Try the following instead: UserProperty prop = appt.UserProperties.Find(propertyName,Type.Missing ); if (prop == null) prop = appt.UserProperties.Add(propertyName, OlUserPropertyType.olText, Type.Missing, Type.Missing); prop.Value = value; appt.Save; Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Ok here's what I got: Microsoft.Office.Interop.Outlook.AppointmentItem appt; string propertyName = "MyProp"; // if the property doesn't exist if(!appt.UserProperties.Find(propertyName,Type.Mis sing)) { appt.UserProperties.Add(propertyName,Microsoft.Off ice.Interop.Outlook.OlUserPropertyType.olText, Type.Missing, Type.Missing); } appt.UserProperties[propertyName].Value = value; appt.Save(); Steve "Dmitry Streblechenko" wrote: :-) What is your code that sets the propeties and saves the item? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Dmitry Please use my comment for your product OutlookSpy: WOW! It does what it says! As hard as it was to articulate the differences between two systems with your tool I think I may have found something, finally. Dmitry although it does require some explaination - looking at the IMessage GetProps tab I see lots of differences in number of properties with each Appointment item and values. As I suspected my userproperties have no values in the system/version that doesn't work. one property that is interesting is http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/urn:schemas:calendar:version. BTW the value is 2.0. I don't see this one on systems that do work for my Outlook Addin. Do you know what its for? Can you offer an explanation why aren't my properties storing values? Is it possible my properties somehow depend on the property offset? "Dmitry Streblechenko" wrote: 1.Yes, you can set any number of properties before calling Save 2. Provide the relevant snippets of your code and indicate what exactly does not work. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... 1) I have seen other MVP's say that when a UserProperty is added the item should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
#9
|
|||
|
|||
![]()
That's exactly what I see on machines that my addin is running but is unable
to set and retrieve property values on. OutlookSpy shows empty properties with the right name but no value when I click IMessage. On other machines my code works great, it sets and retrieves properties using the code you suggested just as well as it did before with the code I submitted previously. I have saved the IMessage to text files via OutlookSpy. I can provide them if you think it would be helpful. Did I say I appreciate the help, I do. Steve "Dmitry Streblechenko" wrote: So what exactly happens when you run that code? Do you see an empty property with the right name but no value in OutlookSpy when you click IMessage? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Thank you for the reply unfortunately it still doesn't work on all machines. However the changes didn't break anything on previously working machines. First let me apologize for double posting Ken Slovak politely yelled at me for also posting in the VSTO newsgroup. Ken my apologies. Dmitry - I noticed your app which works perfectly well on several machines I'm working with for testing uses a different interface. Some sample code also on outlookcode.com by Helmut Obertanner that was inspired by yourself that doesn't use the Outlook Object Model. Is this another potentially better more generic approach? Thanks Steve "Dmitry Streblechenko" wrote: Try the following instead: UserProperty prop = appt.UserProperties.Find(propertyName,Type.Missing ); if (prop == null) prop = appt.UserProperties.Add(propertyName, OlUserPropertyType.olText, Type.Missing, Type.Missing); prop.Value = value; appt.Save; Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Ok here's what I got: Microsoft.Office.Interop.Outlook.AppointmentItem appt; string propertyName = "MyProp"; // if the property doesn't exist if(!appt.UserProperties.Find(propertyName,Type.Mis sing)) { appt.UserProperties.Add(propertyName,Microsoft.Off ice.Interop.Outlook.OlUserPropertyType.olText, Type.Missing, Type.Missing); } appt.UserProperties[propertyName].Value = value; appt.Save(); Steve "Dmitry Streblechenko" wrote: :-) What is your code that sets the propeties and saves the item? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Dmitry Please use my comment for your product OutlookSpy: WOW! It does what it says! As hard as it was to articulate the differences between two systems with your tool I think I may have found something, finally. Dmitry although it does require some explaination - looking at the IMessage GetProps tab I see lots of differences in number of properties with each Appointment item and values. As I suspected my userproperties have no values in the system/version that doesn't work. one property that is interesting is http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/urn:schemas:calendar:version. BTW the value is 2.0. I don't see this one on systems that do work for my Outlook Addin. Do you know what its for? Can you offer an explanation why aren't my properties storing values? Is it possible my properties somehow depend on the property offset? "Dmitry Streblechenko" wrote: 1.Yes, you can set any number of properties before calling Save 2. Provide the relevant snippets of your code and indicate what exactly does not work. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... 1) I have seen other MVP's say that when a UserProperty is added the item should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
#10
|
|||
|
|||
![]()
Any there anythign special about thee machines where the code does nto work?
Where does tehe item come from? Is it is primary mailbox store, delegated store, Public Folder, etc? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... That's exactly what I see on machines that my addin is running but is unable to set and retrieve property values on. OutlookSpy shows empty properties with the right name but no value when I click IMessage. On other machines my code works great, it sets and retrieves properties using the code you suggested just as well as it did before with the code I submitted previously. I have saved the IMessage to text files via OutlookSpy. I can provide them if you think it would be helpful. Did I say I appreciate the help, I do. Steve "Dmitry Streblechenko" wrote: So what exactly happens when you run that code? Do you see an empty property with the right name but no value in OutlookSpy when you click IMessage? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Thank you for the reply unfortunately it still doesn't work on all machines. However the changes didn't break anything on previously working machines. First let me apologize for double posting Ken Slovak politely yelled at me for also posting in the VSTO newsgroup. Ken my apologies. Dmitry - I noticed your app which works perfectly well on several machines I'm working with for testing uses a different interface. Some sample code also on outlookcode.com by Helmut Obertanner that was inspired by yourself that doesn't use the Outlook Object Model. Is this another potentially better more generic approach? Thanks Steve "Dmitry Streblechenko" wrote: Try the following instead: UserProperty prop = appt.UserProperties.Find(propertyName,Type.Missing ); if (prop == null) prop = appt.UserProperties.Add(propertyName, OlUserPropertyType.olText, Type.Missing, Type.Missing); prop.Value = value; appt.Save; Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Ok here's what I got: Microsoft.Office.Interop.Outlook.AppointmentItem appt; string propertyName = "MyProp"; // if the property doesn't exist if(!appt.UserProperties.Find(propertyName,Type.Mis sing)) { appt.UserProperties.Add(propertyName,Microsoft.Off ice.Interop.Outlook.OlUserPropertyType.olText, Type.Missing, Type.Missing); } appt.UserProperties[propertyName].Value = value; appt.Save(); Steve "Dmitry Streblechenko" wrote: :-) What is your code that sets the propeties and saves the item? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... Dmitry Please use my comment for your product OutlookSpy: WOW! It does what it says! As hard as it was to articulate the differences between two systems with your tool I think I may have found something, finally. Dmitry although it does require some explaination - looking at the IMessage GetProps tab I see lots of differences in number of properties with each Appointment item and values. As I suspected my userproperties have no values in the system/version that doesn't work. one property that is interesting is http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/urn:schemas:calendar:version. BTW the value is 2.0. I don't see this one on systems that do work for my Outlook Addin. Do you know what its for? Can you offer an explanation why aren't my properties storing values? Is it possible my properties somehow depend on the property offset? "Dmitry Streblechenko" wrote: 1.Yes, you can set any number of properties before calling Save 2. Provide the relevant snippets of your code and indicate what exactly does not work. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Steve" wrote in message ... 1) I have seen other MVP's say that when a UserProperty is added the item should be saved , can you safely add many items (like many user properties) before actually saving the item? 2) I am working on an Outlook addin that works great on my dev machine but appearantly doesn't save/read userproperties for appointment items but task items appearantly read/save fine on most systems. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Region UserProperties | Vbasiccode | Outlook - Using Forms | 3 | May 14th 07 03:13 PM |
UserProperties Icon | Anyone for Coffee? | Add-ins for Outlook | 2 | May 1st 07 09:17 PM |
UserProperties | j | Add-ins for Outlook | 0 | February 12th 07 07:06 AM |
VB.net Cannot add userproperties | Ben | Add-ins for Outlook | 2 | February 24th 06 10:32 AM |
Userproperties in Folder | MClaudio | Outlook and VBA | 3 | January 16th 06 07:59 AM |