![](/img/trans.png)
[英]MS-Word-VBA UserForm - How to run a macro from a command button to a specific location inside the document?
[英]How to Set Outlook in Work Offline Mode by VBA(Macro) Running From MS Word VBA UserForm
我正在尝试运行一个 VBA 代码,它应该让用户将文件附加到邮件合并功能中。
为了做到这一点,我需要将 Outlook 置于离线模式,以便在将任何文件附加到邮件之前将邮件保存在发件箱中。 现在我想知道是否有一种方法可以通过 Word 宏将 Outlook 2007 置于脱机模式?
首先,添加对 Outlook 对象库的引用。 如果 Outlook 已经打开:
Outlook.ActiveExplorer().CommandBars.FindControl(, 5613).Execute
如果 Outlook 已关闭:
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")
olApp.GetNamespace("MAPI").Folders.GetFirst.GetExplorer.CommandBars.FindControl(, 5613).Execute
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.