Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6662617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:24:31+00:00 2026-05-26T02:24:31+00:00

I have inherited an office 2010 plugin for Outlook. It is supposed to be

  • 0

I have inherited an office 2010 plugin for Outlook. It is supposed to be able to save the mails, attachments or both in a seperate database/file. It saves the mails incl attachments just nicely (aka both). If I choose only to save the attachments it still saves both (mail + attachments), that being – a nice msg file with attachments included (msg being outlook mail file format).
There is also an Office 2003/2007 version that can do this correctly, either saving the mail, the attachments or both pending on choice. I have been reviewing the code for a couple of days now and I haven’t been able to find the difference between what the 2003/7 is capable of and what 2010 is not capable of.

Can it be that the Outlook 2010 can’t save mails and attachments seperately from a code perspective?

Details:
Office 2003 plugin: Written in C#, .NET3.5, VS8
Office 2007 plugin: C#, .NET3.5, VS8
Office 2010 plugin: C#, .NET4, VS10

We have officially retired the 2003 version and is nolonger maintaining that. 2007 is being bugfixed when somebody reports anything. 2010 is the “new” black 😉

I may have found a key point

protected override void EnableAddAttachmentsToLegis()
{  
    // Adds a button on the right click context menu, 
    // when user clicks on an attachment:
    _application.AttachmentContextMenuDisplay
        += new Outlook.ApplicationEvents_11_AttachmentContextMenuDisplayEventHandler
        (Application_AttachmentContextMenuDisplay);  
}

http://technet.microsoft.com/en-us/query/bb623145 – bummer, good question is now – what replaced it, or was it completely abolished.

Which has been replaced by 2007 – http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.applicationevents_11_event_members.aspx – which deprecated for 2010.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:24:32+00:00Added an answer on May 26, 2026 at 2:24 am

    I have done something like this times ago when I was using Outlook. I’m going to outline my steps:

    Subscribed to the new mail event:

    Application.NewMailEx += Application_NewMailEx;
    

    The handler provides you with a list of all new mails using a comma separated string. I splitted and processed each of the ids:

    string[] entryIds = EntryIDCollection.Split ( new char[] { ',' } );
    foreach (string entryId in entryIds) {
        processMail ( entryId, maskExpanded );
    }
    

    The processMail function retrieves the mailitem and iterates ofer all attachments if there are attachments:

    private void processMail( string entryId ) {
        Outlook.MailItem mail = Application.Session.GetItemFromID ( entryId ) as Outlook.MailItem;
        if (mail.Attachments.Count > 0) {
            foreach (Outlook.Attachment att in mail.Attachments)
                processAttachment ( att );
        }
    }
    

    The processAttachment function’s core just saved the attachment using

    attachment.SaveAsFile ( <filename> );
    

    The functions in my add in do a bit more ( e.g.creating a directory structure ), but the basic idea should have become obvious. Doing this for mail items outside the mail new event is probably following the same steps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have inherited both an existing WinForms app and an existing .CHM file, created
I have inherited an application built using the Microsoft Office Information Bridge Framework 1.6.
I have inherited an Actionscript file from an old project and I've been told
I have inherited a Access database that has a query that SELECTs over 50
I have inherited a database I need to work with. All the numeric fields
We have a back office system that inserts invoice information into an SQL database
I have inherited a system built on a MySQL database using InnoDB tables. The
We have inherited an application (Java-based, running on WebLogic 10.3.5) that makes extensive use
I have inherited a Drupal 6 site to maintain. I am new to Drupal
I have inherited work from a previous employee. The issue I'm having is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.