vba 通过 Sharepoint 与他人共享自定义宏和自定义 Excel 功能区
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20764336/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Sharing custom macros and custom Excel Ribbon with others via Sharepoint
提问by gordon613
My colleagues and I use Excel 2013 and Sharepoint
我和我的同事使用 Excel 2013 和 Sharepoint
I have written some custom macros which I have stored in Personal.xlsb
I have also customized the ribbon to add a tab to access these macros.
我编写了一些存储在其中的自定义宏,我Personal.xlsb
还自定义了功能区以添加一个选项卡来访问这些宏。
What is the best way of sharing these macros and the ribbon with my colleagues? (and keeping them updated)
与同事共享这些宏和功能区的最佳方式是什么?(并保持更新)
One way is as follows (and this needs to be done each time there is a change)
一种方法如下(并且每次有变化时都需要这样做)
- right-click Ribbon | Customize the Ribbon | Import/Export | Export all Customizations and send this XML file to my colleagues and ask them to import it
- Send my colleagues my Personal.xlsb and ask them to overwrite their own with this.
- 右键单击功能区 | 自定义功能区 | 导入/导出 | 导出所有自定义并将此 XML 文件发送给我的同事并要求他们导入
- 将我的 Personal.xlsb 发送给我的同事,并要求他们用这个覆盖他们自己的。
However is there a better way - involving manual effort on the part of my colleagues as little as possible.
但是,有没有更好的方法 - 尽可能少地涉及我同事的手动工作。
I thought perhaps of saving the macros as a sharepoint document, and then editing the XML document to point to this sharepoint document.
我想也许将宏保存为共享点文档,然后编辑 XML 文档以指向这个共享点文档。
采纳答案by gordon613
The best answer that I have come up with is as follows:
我想出的最佳答案如下:
- Not to save the files in
personal.xlb
but to save them in an AddIn(an .xlam file) - To add the menus to the Addin via Custom UI Editor For Microsoft Office(downloadable from http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2009/08/07/7293.aspx)
- To save the file in the "Shared With Everyone" folder of "SkyDrive Pro"
- To send a link to the file to my colleagues
- 不是将文件保存在,
personal.xlb
而是将它们保存在AddIn(.xlam 文件)中 - 通过Microsoft Office 的自定义 UI 编辑器将菜单添加到插件(可从http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2009/08/07/7293.aspx下载)
- 将文件保存在“SkyDrive Pro”的“与所有人共享”文件夹中
- 将文件链接发送给我的同事
This seems to solve all the issues. If I do an update then it seems that if my colleagues restart their computer then the addin is updated automatically.
这似乎解决了所有问题。如果我进行更新,那么似乎如果我的同事重新启动他们的计算机,那么插件会自动更新。