VbaProject.OTM 部署 [英] VbaProject.OTM deployment

查看:45
本文介绍了VbaProject.OTM 部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我来到这个页面考虑将我的 VbaProject.OTM 文件(位于 %appdata%MicrosoftOutlook 中)分发给我办公室的大约 30 个用户的最佳方法.简单地将 OTM 文件复制/粘贴到网络上,然后将其复制/粘贴回所有用户的计算机(手动或使用 .bat)是否更好使用该方法会更好在上面的链接中描述生成一个 OPS 文件并使用 Proflwiz.exe 将其导入回来?有什么区别?

I came by this page and was thinking about the best method to distribute my VbaProject.OTM file (located into %appdata%MicrosoftOutlook) to a bunch of ~30 users at my office. Is it better to simply copy/paste the OTM file onto the network and then copy/paste it back to all users' computers (manually or with a .bat) OR would it be better to use the method described in the link above to generate a OPS file and import it back with Proflwiz.exe? What's the difference?

实际上,我们都在使用 Microsoft Office Outlook 2003,我们可能有一天会升级到 2007,但仍需数年时间.

We are all on Microsoft Office Outlook 2003 actually, we might upgrade to 2007 one day but still years from now.

推荐答案

最后想出了一些元素来部署 Outlook VBA 项目.有很多方法可以做到这一点,但不安装任何东西并保持相同方法的最简单方法是直接从服务器运行 OTM 文件.我发现 Outlook.exe 进程有一个参数 altvba 允许指定另一个路径来运行 OTM 文件.这是一个例子:

Finally came up with some elements to deploy a Outlook VBA Project. There are a lot of ways to do this, but the easiest way to do so without installing anything and keeping the same methodology would be to run a OTM file directly from a server. I found out that the process outlook.exe has a parameter altvba that allows to specify another path to run the OTM file from. Here is en example:

outlook.exe/altvba "\myServermyFoldermyFile.otm"

这允许我只更新一个文件来更新所有计算机.显然,如果文件大,服务器ping偏高,可能会延迟Outlook的启动.这种方法的另一个问题是,如果你想更新服务器上的 OTM 文件,每个人都必须关闭 Office(如果你在一个每个人都使用 Outlook 的办公室工作,你知道这是不可能的 让每个人同时关闭它,除非你编写了一个宏来最终这样做).为了防止这两个问题,我可以设置一个批处理文件来在每次有新版本时复制服务器 OTM 文件客户端(只需检查 NTFS last-modify 属性).这样,Outlook 将使用本地文件启动,如果需要,批处理文件需要 2-3 秒来复制文件(或将立即启动 Outlook),并且更新服务器上的 OTM 文件将没有问题.用户必须使用批处理文件启动 Outlook(或使用略有不同的 Outlook.exe 路径和 altvba 参数,因此无论哪种方式,他们都需要不同的快捷方式/文件才能第一次启动).altvba 的另一个优点是,用户在没有它的情况下仍然可以轻松运行 Outlook(查看 VBA 是否有问题,以防 Outlook 缓慢),并且文件将保持不变Outlook 重新初始化.

This allows me to update only one file to get all computers updated. Obviously, if the file is big and the server's ping is on the high side, it may delay the launch of Outlook. The other problem with this method is that everybody will have to shut down Office if you want to update the OTM file on the server (and if you do work in an office where everyone uses Outlook, you do know that it is impossible to get everyone to shut it down at the same time, except if you code a macro to do so eventually). To prevent both those problems, I could setup a batch file to copy the server OTM file clientside everytime there is a new version (just have to check the NTFS last-modify attribute). This way, Outlook will boot with a local file, the batch file take 2-3 seconds to copy the file if needed (or will launch Outlook instantaneously) and there will be no problem updating the OTM file on the server. Users will have to start Outlook with the batch file (or with the slightly different outlook.exe path with the altvba parameter, so either way they need a different shortcut/file to start off the first time). One other advantage of the altvba is that it's still easy for the user to run Outlook without it (to see if the VBA is problematic or not in case Outlook is sluggish) and the file will remain unchanged after a Outlook reinitialization.

其他解决方案包括一个 COM 补充,可以在很多语言上开发,包括 VB6(不需要从 VBA 转换).Microsoft Office XP Developer 中还包含大量工具,可以帮助完成工作(但不是免费的,尤其是在您需要最新版本的情况下).

Others solutions include a COM complement that can be developed in a lot on languages including VB6 (no conversion needed from VBA). There is also a bunch of tools included into Microsoft Office XP Developer that could help getting the job done (not free however, especially if you need the most up-to-date version).

这篇关于VbaProject.OTM 部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆