J'ai ajouté deux boutons qui envoient et copient et envoient et déplacent des emails depuis Outlook vers notre système de gestion de documents qui se trouve dans Sharepoint. J'ai les deux boutons qui fonctionnent, mais l'orthographe automatique dans Outlook n'est pas invoquée. Existe-t-il un moyen d'invoquer l'orthographe de outlooks 2007 avant d'envoyer l'e-mail par programme?Invocation de Spellcheck dans Office 2007 via le complément vsto en utilisant C# lors de l'envoi de courrier électronique
Voici un extrait de code ...
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);
}
}