private string GetWorkHoursXML(){ try { Outlook.StorageItem storage = Application.Session.GetDefaultFolder( Outlook.olDefaultFolders.olFolderCalendar).GetStorage( "IPM.Configuration.WorkHours",Outlook.olStorageIDentifIErType.olIDentifyByMessageClass); Outlook.PropertyAccessor pa = storage.PropertyAccessor; // PropertyAccessor will return a byte array for this property byte[] rawXmlBytes = (byte[])pa.GetProperty( "http://schemas.microsoft.com/mAPI/proptag/0x7C080102"); // Use EnCoding to convert the array to a string return System.Text.EnCoding.ASCII.GetString(rawXmlBytes); } catch { return string.Empty; } }
有关更多信息,请参见How to: Store Solution-Specific Data as a Hidden Message in a Folder.
总结以上是内存溢出为你收集整理的c# – 如何使用StorageItem保存vsto加载项特定数据全部内容,希望文章能够帮你解决c# – 如何使用StorageItem保存vsto加载项特定数据所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)