NetOffice Outlook Plugin Deployment

1.4k views Asked by At

I am using NetOffice to develop an Outlook plugin. This plugin is working on my local machine when (somehow magically) deployed through Visual Studio (If I run the project and then open the Outlook the functionality is there). All fine till here. However, I need to deploy it to other people's computers (who do not have VS installed) and I am really struggling to find a way on how to do that.

My plugin looks like this:

[COMAddin(Constants.ProjectName, "Tool", 3)]
[Guid("B3F60319-1A11-4F3E-9C1B-3AE908D9CA86"), ProgId("Tool.OutlookIntegration")]
public class OutlookIntegration : COMAddin
{
    public OutlookIntegration()
    {
        this.OnStartupComplete += new OnStartupCompleteEventHandler(this.Integrate);

        _settings = new Settings();
    }

    /* Integrate creates a menu item which does what I need. */
}

The project type is library. Now, the question is how do I make this run on someone elses PC? If you happen to know about some tutorial or anything like that, please let me know. There are resources on the internet on developing Outlook plugins however they seem to be different for NetOffice. NetOffice itself has great documentation for development, but not for deployment (I havent found it at least).

I am also happy to provide any additional details needed.

2

There are 2 answers

0
Eugene Astafiev On BEST ANSWER

It doesn't matter what libraries are used for development Office add-ins. The deployment process is the same for all COM add-ins. See the Deploying an Office Solution section in MSDN.

0
Spyros Karavanis On

In order for outlook to install an addin the only thing you have to do is add some records in registy

string runKey = "SOFTWARE\\Microsoft\\Office\\Outlook\\Addins";
RegistryKey startupKey = Registry.CurrentUser.OpenSubKey(runKey,  true);
if (startupKey != null)
{
  runKey="SOFTWARE\\Microsoft\\Office\\Outlook\\Addins\\yourAddinNameSpace.yourAddinClass";
  startupKey = Registry.CurrentUser.OpenSubKey(runKey, true);
  if (startupKey == null)
    startupKey = Registry.CurrentUser.CreateSubKey(runKey);
    startupKey.SetValue("Description", "yourAddinName", Microsoft.Win32.RegistryValueKind.String);
    startupKey.SetValue("FriendlyName", "yourAddinName", Microsoft.Win32.RegistryValueKind.String);
    startupKey.SetValue("LoadBehavior", 3, Microsoft.Win32.RegistryValueKind.DWord);
  }
}
else 
  Console.WriteLine("Outlook is not installed");