将 Outlook VBA 转换为独立脚本
我编写了一些 VBA,它访问用户的 Outlook 便笺和联系人、执行一些操作、修改便笺和联系人,同时输出一些文本文件。它运作得很好。
目前,它通过执行 Tools > 操作在 Outlook 中运行(与所有其他 VBA 代码一样)。宏>宏... 然而,对于不懂技术的用户来说,安装是一件痛苦的事情,并且考虑到这是一个简单的 BAS 模块(无表单),它实际上不需要以这种方式运行。
可以通过在资源管理器中双击来执行的脚本文件将是一个更好的选择。这将更容易重新分发,并且意味着任何人都可以使用它。
假设可以将 VBA 变成独立脚本...
- 我该怎么做?
- 我还应该知道什么?有什么注意事项或需要注意的事情吗?我需要更改任何代码吗?
谢谢。
I've written some VBA which accesses the users Outlook notes and contacts, performs some manipulations, modifies the notes and contacts and at the same time outputs some text files. It works very well.
At present it runs (like all other VBA code) inside Outlook by doing Tools > Macro > Macros... however installation is a pain for non-tech savvy users to do and given that is is a simple BAS module (no forms), it doesn't really need to be run in this way.
A script file which could be executed by double-clicking within explorer would be a far better option. This would be easier to re-distribute and mean that anyone could use it.
Assuming it is possible to turn the VBA into a standalone script...
- How do I do it?
- What should I also know? Any caveats or things to be aware of? Any code I'll need to change?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我意识到这篇文章已经过时了,但是 VB6 COM DLL 是一个选项吗?
以下是您可以执行的操作的简单示例:
http://support.microsoft.com/kb/316983
您可以使用 Inno Setup 之类的安装程序来创建一个 EXE,它将在每台计算机上安装并注册 DLL。
I realize this post is old, but is a VB6 COM DLL an option?
Here's a simple example of what you can do:
http://support.microsoft.com/kb/316983
And you can use an installer like Inno Setup to create an EXE which would install and register the DLL on each computer.