PC Review


Reply
Thread Tools Rate Thread

ClickEvents for Attachments

 
 
Asim Tozlu
Guest
Posts: n/a
 
      30th Jan 2008
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
 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      30th Jan 2008
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


 
Reply With Quote
 
Asim Tozlu
Guest
Posts: n/a
 
      31st Jan 2008
Hi Ken,

thanks.

Asim

"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

>
>



 
Reply With Quote
 
Asim Tozlu
Guest
Posts: n/a
 
      31st Jan 2008
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

>
>



 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      31st Jan 2008
The event you're looking for belongs to items, such as MailItem. You can't
just instantiate an event handler for BeforeAttachmentPreview without having
some item that fires that event. You probably should be instantiating a
class level Explorer object and handling the Explorer.SelectionChange()
event. That would let you know when one or more items are selected. Then you
can iterate the Selection collection and instantiate objects for each
selected item. It is on those items that you be handling
BeforeAttachmentPreview.

AttachmentSelection is also related to a specific item and can't just be
used generically for whenever one or more attachments are selected. You must
have an item instantiated that has those attachments and the
AttachmentSelection collection.

--
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:(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving Emails with Attachments - Can't Open Attachments Giovanna Microsoft Outlook Discussion 12 28th Oct 2009 08:23 PM
Difference between Regular Attachments and Signature Attachments Andrew Microsoft Outlook Program Addins 3 24th Mar 2009 04:41 PM
My Pics attachments are sending with other attachments included? =?Utf-8?B?U3V6aWU=?= Microsoft Outlook Discussion 1 2nd Mar 2006 06:39 PM
Inline attachments (pictures) showing up as separate attachments =?Utf-8?B?RA==?= Microsoft Outlook Discussion 2 31st Jan 2006 02:20 PM
send attachments, attachments not attached at receiver Tech.forge Microsoft Outlook Discussion 2 1st Apr 2004 06:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:37 AM.