问题描述
我为Word,Excel和Powerpoint 2016开发了一个Office加载项。它可以正常运行。现在,我需要添加对OneNote 2016的支持,但是由于某些原因,它不起作用-OneNote启动时加载项无法加载。
我开发了一个非常简化的加载项,以调查为什么无法加载加载项,请参见下面的代码。这个简单的Hello world外接程序适用于Word,Excel和Powerpoint 2016,但不适用于OneNote。
OneNote的外接程序开发过程是否有差异?
有人有类似的经验并且可以提供帮助吗?非常感谢!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using Office = Microsoft.Office.Core;
using System.IO;
using Extensibility;
using System.Windows.Forms;
using System.Globalization;
namespace MyAddin.OneNote14
{
[GuidAttribute(Addin.CLSID),ProgId(Addin.PROGID),ComVisible(true)]
public class Addin : Extensibility.IDTExtensibility2,Office.IRibbonExtensibility
{
public const string CLSID = "27B8E4DD-D08C-4054-89C1-466F2A83D0E0";
public const string PROGID = "MyAddin.OneNote14";
public Addin()
{
MessageBox.Show("Hello!");
}
public void OnConnection(object application,Extensibility.ext_ConnectMode connectMode,object addInInst,ref System.Array custom)
{
}
public void OnStartupComplete(ref System.Array custom)
{
}
public void OnAddInsUpdate(ref System.Array custom)
{
}
public void OnBeginShutdown(ref System.Array custom)
{
}
public void OnDisconnection(Extensibility.ext_DisconnectMode disconnectMode,ref System.Array custom)
{
}
public string GetCustomUI(string RibbonID)
{
return null;
}
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)