Excel 加载项 - 关于让加载项在没有安全通知的情况下工作的 Microsoft 认证

Excel add-in - about microsoft certification to let add-in work without security notification

我开发了一个 Excel 加载项 (.xlam),将为我们的客户部署。 我正在寻找我应该对 Microsoft 执行的任何操作,以使其经过认证或验证以绕过任何高宏安全级别通知或用户操作。

我们的大多数客户应该有这么高级别的参数,如果他们必须单击任何手册 "activation" 让加载项工作,他们会感到沮丧或恼火...

我们已经获得了一个有效的证书,用于为我们生产的独立软件签署 .dll 或 .exe 文件,但我无法使其适用于 .xlam 文件...

信息:.xlam 文件已经 Excel 2007、2010、2013 和 2016 兼容。

任何帮助将不胜感激:)

我使用单个按钮创建 xlsm 文件作为安装程序文件,这会触发 Install()。

Install () 然后将安装程序文件从 xlsm 转换为 xlam 并添加到 excel 插件中。

当用户打开 excel 时它会自动打开,不再需要激活宏

**** 确保安装程序文件包含您的所有逻辑

Sub Install()

Dim macroWBD, tempWBD As Workbook
Dim sFile, newPath As String
Dim oAddin As AddIn

newPath = "C:\Excel AddOns\"
addOnFileName = "~~~~"

    Set macroWBD = ThisWorkbook

    On Error Resume Next
    AddIns(addOnFileName).Installed = False
    Kill Application.UserLibraryPath & addOnFileName & ".xlam"

    On Error GoTo 0
    Application.DisplayAlerts = False
    'Saves current workbook as an .xlam file
    sFile = Application.UserLibraryPath & addOnFileName & ".xlam"

    If MakeDir(newPath) <> True Then MsgBox "Unable to install !": Exit Sub
    sFile = newPath & addOnFileName & ".xlam"
    macroWBD.SaveAs sFile, 55


    macroWBD.IsAddin = True
    'Adds temporary workbook
    Set tempWBD = Workbooks.Add

    'Installs the addin
    Set oAddin = AddIns.Add(sFile, False)
    oAddin.Installed = True

    'Closes temporary workbook
    tempWBD.Close False

    Application.DisplayAlerts = True
    MsgBox ("Installation Successful" & vbNewLine & "Please Restart Excel.")

    macroWBD.Close False


End Sub