【问题标题】:Loop for all outlook inspectors循环所有外观检查员
【发布时间】:2016-04-28 03:38:27
【问题描述】:

假设我已经打开了 3 个 Outlook 检查器。

如何循环 3 个 Outlook 检查器?

所以,我需要一个如下所示的 vb.net 代码;

For Each i In All.Outlook.Inspectors

Next i

【问题讨论】:

    标签: vb.net outlook


    【解决方案1】:

    以下代码使用 Inspectors 对象的 Inspectors 属性和 Count 属性和 Item 方法来显示所有检查器窗口的标题。

    Dim myInspectors As Outlook.Inspectors  
    Dim x as Integer  
    Dim iCount As Integer 
    Set myInspectors = Application.Inspectors  
    iCount = Application.Inspectors.Count  
    If iCount > 0 Then  
      For x = 1 To iCount
        MsgBox myInspectors.Item(x).Caption  
      Next x  
    Else  
      MsgBox "No inspector windows are open."  
    End If 
    

    Getting Started with VBA in Outlook 2010 文章可能对您有所帮助。

    【讨论】:

    • 已解决。非常感谢。
    • 我想在 VSTO 插件的 C# 中做同样的事情。 Application.Inspector 中没有 Item 方法。你能帮忙吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多