将Outlook项目的用户定义属性设置为只读 [英] Setting outlook item's user defined properties as readonly
问题描述
我有一个Outlook加载项,它在Outlook TaskItem的用户属性部分中存储值.使用下面的代码,保存部分可以很好地工作,但是我希望能够在ToDoList中将此字段显示为只读.目前,我正在显示它,但用户可以更改值.
我没有找到设置只读的方法. msdn上提到的属性似乎不允许此 MSDN
我的代码是:
Hi,
I have an Outlook add-on that stores a value in user properties part of an Outlook TaskItem. The saving part works well using the code below, but I want to be able to display this field in ToDoList as read-only. For the moment I am displaying it but the user can change the value.
I didn''t find a way to set read-only. The properties mentioned on msdn doesn''t seem to allow this MSDN
My code is:
if (task.UserProperties["TMSTaskID"] == null)
{
task.UserProperties.Add("TMSTaskID", Outlook.OlUserPropertyType.olInteger, Type.Missing, Type.Missing);
}
task.UserProperties["TMSTaskID"].Value = _MyTask.TaskID;
task.Save();
如果有人知道解决方案或解决方法,我将不胜感激.
谢谢
PS:我忘了提一下,我需要在没有自定义表单的情况下执行此操作.
If anyone knows a solution or a workaround I''ll really appreciate it.
Thank you
PS: I forgot to mention that I need to do this without custom forms
推荐答案
尚无评论?
我也需要这个.这让我感觉像这样 http://xkcd.com/979/
No comment yet?
I''m needing this also. It makes me feel like this http://xkcd.com/979/
这篇关于将Outlook项目的用户定义属性设置为只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!