Hi Ken,
i want try this:
public partial class ThisAddIn
{
private Outlook.AttachmentSelection _AttachmentSelection = null;
private Microsoft.Office.Interop.Outlook.ItemEvents_10 _events;
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
_events = (Outlook.AttachmentSelection)_AttachmentSelection;
_events.BeforeAttachmentPreview += new
Outlook.ItemEvents_10_BeforeAttachmentPreviewEventHandler(_BeforeAttachmentPreview);
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}
private void
_BeforeAttachmentPreview(Microsoft.Office.Interop.Outlook.Attachment
_Attachment, ref bool cancel)
{
//look the extension of attachment in mail and work
}
#region Von VSTO generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert
werden.
/// </summary>
private void InternalStartup()
{
this.Startup += new System.EventHandler(ThisAddIn_Startup);
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
}
#endregion
}
But i have problems to find the events for BeforeAttachmentPreview. My idea
is, that the user click in Outlook2007 in his mail of the attachments. Now i
want read this attachment und see what the extension have it und then i
workt with them.
Thanks
Asim Tozlu