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
"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> Have you looked in the Object Browser at the item.BeforeAttachmentPreview
> event? Or the other attachment events for any item? You should always
> check in the Object Browser for any events, methods or properties you're
> looking for.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "Asim Tozlu" <(E-Mail Removed)> wrote in message
> news:762D341A-E079-4D70-80C1-(E-Mail Removed)...
>> Hi,
>>
>> i search a click-event for the attachments in outlook 2007.
>>
>> I want use VS 2005 SE for writing a PreviewHandle under outlook 2007.
>>
>> thanks
>>
>> asim
>
>