Outlook 2007 Application event AttachmentContextMenuDisplay not working.

I am writing an addin for Outlook 2007 (yes 2007)

Code is simply this....

Private Sub ThisAddIn_Startup() Handles Me.Startup
	AddHandler Me.Application.AttachmentContextMenuDisplay, AddressOf Attachment_ContextMenu_Event
End Sub

Open in new window


Private Sub Attachment_ContextMenu_Event(CommandBar As Microsoft.Office.Core.CommandBar, Attachments As Microsoft.Office.Interop.Outlook.AttachmentSelection)
        Log("Attachment_ContextMenu_Event")
    End Sub

Open in new window


The event never happens on my work PC.  But I just now tried it my home computer and it worked fine.  The work PC is under group policy can this be the problem or are there other settings in Outlook 2007 that could be preventing this from working?
LVL 20
darbid73Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

darbid73Author Commented:
I worked out the answer.  The above event will not fire if "Turn Off Attachments Preview" is checked in Outlook.  Also the above event does not fire if the attachment is in the body of the text and not at the top.

How do I uncheck this property
Preview Attachments
In case the link is changed.  Here is the text for Outlook 2010.  The only difference for 2007 is that you get to the property with Tool > Trust Center > Attachment Handing.

If you don't want to use some or any of the attachment previewers, do the following in Outlook:

    Click the File tab.

    Click Options

    Click Trust Center.

    Under Microsoft Outlook Trust Center, click Trust Center Settings, and then click Attachment Handling.

    Do one of the following:

        To turn off all attachment previewers, click Turn off Attachment Preview.

        To turn off a specific attachment previewer, click Attachment and Document Previewers, clear the check box for a previewer that you want to turn off, and then click OK.
40fc6e6d-0c08-498c-9cda-ff00804463f6.gif
0c65e167-64ea-4598-b871-bd87851ffc8e.gif
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.