Я добавил две кнопки, которые отправляют и копируют, а также отправляют и перемещают электронные письма из outlook в нашу систему управления документами, которая находится в Sharepoint. У меня обе кнопки работают, но автоматическая проверка орфографии в outlook не вызывается. Есть ли способ вызвать проверку орфографии outlookks 2007 перед программной отправкой электронной почты.
Вот фрагмент кода ...
enter code here
void Application_ItemContextMenuDisplay(Microsoft.Office.Core.CommandBar CommandBar, Microsoft.Office.Interop.Outlook.Selection Selection)
{
try
{
CommandBar.Controls[1].BeginGroup = true; // add seperator before first menu
if (Selection.Count == 1)
{
_mailItem = Selection[1] as Outlook.MailItem;
if (_mailItem != null)
{
Office.CommandBarButton cmdButtonCopy = (Office.CommandBarButton)CommandBar.Controls.Add(Office.MsoControlType.msoControlButton, 1, Missing.Value, 1, Missing.Value);
cmdButtonCopy.Caption = "&Copy to DMS";
cmdButtonCopy.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(cmdButtonCopy_Click);
Office.CommandBarButton cmdButtonMove = (Office.CommandBarButton)CommandBar.Controls.Add(Office.MsoControlType.msoControlButton, Missing.Value, Missing.Value, 2, Missing.Value);
cmdButtonMove.Caption = "&Move to DMS";
cmdButtonMove.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(cmdButtonMove_Click);
}
}
}
catch (Exception ex)
{
ExceptionService.Instance.Handle(ex.Message, ex);
}
}
void cmdButtonCopy_Click(Microsoft.Office.Core.CommandBarButton Ctrl, ref bool CancelDefault)
{
try
{
**// would like to invoke spell check here......**
Outlook.
Utils.SendToDMS(_mailItem, false);
}
catch (Exception ex)
{
ExceptionService.Instance.Handle(ex.Message, ex);
}
}