110,546
社区成员
发帖
与我相关
我的任务
分享
private void UStrFormRegion_FormRegionShowing(object sender, System.EventArgs e)
{
_MailItem = this.OutlookItem as Outlook.MailItem;
_PropRefno = _MailItem.UserProperties.Find(PROPERTY_NAME_Refno, Type.Missing);
if (_PropRefno != null)
{
txtRefno.Text = _PropRefno.Value as string;
}
else
{
_PropRefno = _MailItem.UserProperties.Add(PROPERTY_NAME_Refno, Outlook.OlUserPropertyType.olText, true);
txtRefno.Text = "";
}
txtRefno.TextChanged += new EventHandler(UStrMail_Changed);
_MailItem.Write += new Outlook.ItemEvents_10_WriteEventHandler(UStrMail_Write);
this.OutlookFormRegion.SetControlItemProperty(txtRefno, PROPERTY_NAME_Refno); //不管用
this.OutlookFormRegion.SuppressControlReplacement = true; //不管用
}