简体   繁体   中英

Simple Outlook 2007 (or newer) plugin / addin with VS 2010 Express

I'm stuck. I have been trying to find, or create myself, a simple barebone example of how to create an Outlook plugin for VS 2010 Express. I know this is simpler to do in VS 2010 Pro, however, is it really impossible to do this in the express version?

My goal is to get "get control", like show a messagebox or similar, when a user hits the "Sendbutton" in Outlook.

I have been trying to play with the Microsoft.Office.Interop.Outlook; Microsoft.Office.Core; without much luck.

Does anybody have a simple example, which runs on the express version?

Some nonfunctional code I was playing with:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

        }

        public delegate void ApplicationEvents_11_ItemSendEventHandler(object Item, ref bool Cancel);

        public void MyItemSendEventHandler(object Item, ref bool Cancel)
        {

        }

        private void InternalStartup()
        {
            this.Startup += new System.EventHandler(ThisAddIn_Startup);
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
        }
    }

}

You have to go for NetOffice , works perfectly with express studios, tried 2010 and 2012.
NetOffice - MS Office in .NET - Home

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM