Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > WinForms/Console Application Design
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the WinForms/Console Application Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 22nd, 2009, 01:59 AM
Authorized User
 
Join Date: Dec 2007
Location: Bangalore, Karnataka, India.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pannasn
Default Can't save outlook appointment user properties

Hi All,

I am creating outlook appoinments from my windows application. I am adding one
user property for each appoinment so that I can retrieve that appoinment later with the unique property value I added.

Outlook.Application outlookApp = new Outlook.Application();
Outlook.AppointmentItem oAppointment = (Outlook.AppointmentItem)outlookApp.CreateItem(Out look.OlItemType.olAppointmentItem);

oAppointment.UserProperties.Add("Key", OlUserPropertyType.olText, true, Missing.Value);
oAppointment.UserProperties["Key"].Value = some randomly generated unique value.
oAppointment.Save();

After saving the appoinment, I am trying to retrieve the appoinment based on the user property I added.

Outlook.NameSpace oNS = outlookApp.GetNamespace("MAPI");
Outlook.MAPIFolder oCalendar = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFo lderCalendar);
Outlook.Items oItems = oCalendar.Items;
Outlook.AppointmentItem oAppt = (Outlook.AppointmentItem)oItems.Find("[Key]='the key value'");


But oAppt is coming as null because it is not able to search with that key value.But I am passing the exact value.

Can anyone provide any suggestion ?

Thanks
Panna
Reply With Quote
  #2 (permalink)  
Old July 23rd, 2009, 01:26 AM
Authorized User
 
Join Date: Dec 2007
Location: Bangalore, Karnataka, India.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to pannasn
Default

It's working fine now with a little changes....

Thanks
Panna
Reply With Quote
  #3 (permalink)  
Old March 3rd, 2010, 10:46 AM
Registered User
 
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dear Pannasn
how did you solve it, i've got the same problem

mvg
Jüriler
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
save outlook mail message Mohammad VB How-To 2 January 27th, 2011 03:55 AM
outlook style appointment control help, thanks! raybristol C# 0 January 17th, 2006 10:39 PM
Accessing Properties in User Controls andyj00 Classic ASP Professional 1 May 21st, 2005 02:52 PM
to save forms' properties vubinhsg BOOK: Access 2003 VBA Programmer's Reference 1 December 20th, 2004 05:20 PM
automate access date to outlook appointment serverrunner Access 2 August 2nd, 2004 08:15 PM



All times are GMT -4. The time now is 06:35 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.