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

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

问题描述

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

实际上我们都在Microsoft Office Outlook 2003上,可能有一天但可能要在几年后升级到2007.

解决方案

最后提出了一些元素来部署Outlook VBA项目.有许多方法可以执行此操作,但是最简单的方法(无需安装任何程序并保持相同的方法)是直接从服务器运行OTM文件.我发现进程Outlook.exe具有参数 altvba ,该参数允许指定另一个路径来运行OTM文件.这是en的示例:

outlook.exe /altvba "\\myServer\myFolder\myFile.otm"

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

其他解决方案包括COM补充,可以用包括VB6在内的多种语言进行开发(无需从VBA进行转换). Microsoft Office XP Developer中还包含许多工具,可以帮助完成工作(但是不是免费的,特别是在您需要最新版本的情况下).

I came by this page and was thinking about the best method to distribute my VbaProject.OTM file (located into %appdata%\Microsoft\Outlook\) 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?

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

解决方案

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 "\\myServer\myFolder\myFile.otm"

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.

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天全站免登陆