MS Office 附加组件
我想在 MS Office 中添加某些功能。 目前,我正在寻找VBA来开发它。 但是,运行宏似乎需要禁用安全性。 这意味着如果我分发VBA程序,其他人需要启用宏才能运行。 (安全问题)
现在的问题是,我写的VBA如何分发? 例如在 .exe 文件中? 还有其他方法可以创建这个附加组件吗?
我下载了一些 MS Word 的附加组件,它似乎是用 C++ 编写的,并且是 .dll 格式。
谢谢。
I want to add on certain feature in MS Office. Currently, I am looking at VBA to develop it. However, it seems that running macros requires security disabled. This means that if I distribute the VBA program, other people need to enable macros to run. (Security issues)
The problem now is, how do I distribute the VBA that I wrote? E.g. in a .exe file? And is there any other method to go about creating this add on?
I downloaded some add on for MS Word and it seems that it is written in C++ and it is in .dll format.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
即使在“高”安全模式下,您也可以在文档/模板/加载项中运行宏,如果:
用户第一次运行宏使用您的数字签名进行签名后,他们会收到一条提示:“宏由您的公司名称签名 - 您是否要信任来自此发布者的所有加载项”。 如果他们单击“是”,他们将不会再次看到提示 - 并且您的宏将运行。
有关如何创建的详细信息,请参阅此链接数字签名。
You can run macros in a document/template/add-in even in "high" security mode, if:
The first time the user runs a macro signed with your digital signature, they'll get a prompt saying "the macros are signed by YourCompanyName - do you want to trust all add-ins from this publisher". If they click "yes", they won't see the prompt again - and your macros will run.
See this link for details of how to create a digital signature.
Visual Studio Tools for Office (VSTO) 允许您创作扩展使用任何 .NET 语言(包括 Visual C++)的 Microsoft Office。 此类扩展确实会编译为 DLL 文件,并且在客户端计算机上安装后,它们不会要求用户忽略任何其他安全警告。 您需要 Visual Studio 2005/2008 Professional 才能使用 VSTO 框架。
Wikipedia 提供有关 VSTO 的更多信息,包括与 VBA 的比较。 亚马逊似乎有还有大量关于该主题的书籍。
Visual Studio Tools for Office (VSTO) allows you to author extensions to Microsoft Office using any .NET language, including Visual C++. Such extensions would indeed compile to DLL-files, and after installation on a client machine, they wouldn't require the user to dismiss any additional security warnings. You will need Visual Studio 2005/2008 Professional in order to use the VSTO framework.
Wikipedia has more information about VSTO, including a comparison with VBA. Amazon seems to have a fair amount of books on the subject as well.