private void ItemSend_Send(object Item, ref bool Cancel) { try { Outlook.UserProperty _activityTrackertyoe = app_Item.UserProperties.Add("ActivityTrackerType", Outlook.OlUserPropertyType.olText,true, 1); _activityTrackertyoe.Value = ActivityTrackerType.Text; Outlook.UserProperty _subType = app_Item.UserProperties.Add("ActivityTrackerSubType", Outlook.OlUserPropertyType.olText,true, 1); _subType.Value = ActivityTrackerSubType.Text; app_Item.Body = ActivityTrackerType.Text + "<<<->>>>" + ActivityTrackerSubType.Text; app_Item.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/X-{ActivityTrackerType}", ActivityTrackerType.Text); app_Item.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/X-{ActivityTrackerSubType}", ActivityTrackerSubType.Text); app_Item.Save(); //var myPages = app_Item.GetInspector.ModifiedFormPages; //var myCtrl1 = myPages("ActivityTracker").Controls("ActivityTrackerType"); //var myCtrl2 = myPages("ActivityTracker").Controls("ActivityTrackerSubType"); //myCtrl1.Enabled = true; //myCtrl1.Value = ActivityTrackerType.Text; //myCtrl2.Enabled = true; //myCtrl2.Value = ActivityTrackerSubType.Text; app_Item.Display(); app_Item.Send(); MessageBox.Show("Sent"+ _activityTrackertyoe.Value+"sub"+ _subType.Value); } catch (Exception) { throw; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)