Use of Microsoft.Office.Interop.Outlook

octola

New member
Joined
Jul 2, 2020
Messages
4
Programming Experience
Beginner
Hello,

Is it possible to retrieve the structure tree of Outlook (I mean to know which files there are, which subfolders, etc....) ?

I don't find clear documentation about how to use the namespace Microsoft.Office.Interop.Outlook.

Does someone have some informations ?

Sorry for my english
 
I don't find clear documentation about how to use the namespace Microsoft.Office.Interop.Outlook.
I just copied the name of the namespace from your post into a search engine and the documentation for that namespace was the very first result.


The second result was the documentation for the Application class, described like this:
Represents the entire Outlook application.
 
I then added "examples" as keyword to my search and the first result was this:


If you look at the tree on the left, you can see that that is in the "How do I..." section, which seems like it might be relevant. When you say that you couldn't find anything, I do have to wonder what you actually looked for.
 
Hello,
I wrote a code to create an Outlook button. :
C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Tools.Ribbon;
using Outlook = Microsoft.Office.Interop.Outlook;

namespace OutlookAddIn4
{
    public partial class MyOutlookAddIn
    {
        private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
        {

        }

        private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
        }

        private void button1_Click(object sender, RibbonControlEventArgs e)
        {

            System.Windows.Forms.MessageBox.Show("Your Ribbon Works!");            
        }

    }
}

In another code, I wrote something to show all folders and childfolders in Outlook.
I would like to execute this code when I push the Outlook button. Is it possible ?

Sorry for my english
 
I have merged these topics for convenience since they are somewhat related.

Please show the code you wrote for the enumerating folders, and explain which button you are trying to click, because even after reading your previous thread (now the current one since merged), I am not following you..

Which outlook button?
 
In post #6, our OP added a button to the Outlook ribbon. What he want to happen is that instead of showing the message box, they want to enumerate the MAPI folder tree. It's pretty straightforward: just call the code that does the enumeration.
 

Latest posts

Back
Top Bottom