Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在microsoft Outlook VBA中使用EmailOptions属性_Vba_Outlook - Fatal编程技术网

无法在microsoft Outlook VBA中使用EmailOptions属性

无法在microsoft Outlook VBA中使用EmailOptions属性,vba,outlook,Vba,Outlook,我正在试验EmailOptions属性。 我在MicrosoftDocs()上找到了这个示例,我正在尝试。但它给出了错误:“对象不支持此属性或方法” 我添加了对MS Word和Excel的引用。我错过了什么 Option Explicit Sub x() With Outlook.Application.EmailOptions.EmailSignature If .NewMessageSignature = "" Then MsgBox "There is no si

我正在试验EmailOptions属性。 我在MicrosoftDocs()上找到了这个示例,我正在尝试。但它给出了错误:“对象不支持此属性或方法”

我添加了对MS Word和Excel的引用。我错过了什么

Option Explicit

Sub x()
With Outlook.Application.EmailOptions.EmailSignature
    If .NewMessageSignature = "" Then
        MsgBox "There is no signature for new " 
    Else
        MsgBox "There is signature for new e-mail"
    End If
End With
End Sub

EmailOptions
属性由
Word.Application
对象公开,而不是由
Outlook.Application
对象公开。

EmailOptions
属性由
Word.Application
对象公开,不是通过
Outlook.Application
对象。将Outlook应用程序更改为word应用程序对象后,我使用了相同的代码,但它不起作用
Sub x()将WordApp设置为Word.Application With WordApp.EmailOptions.EmailSignature
请显示初始化WordApp变量的代码。将outlook应用程序更改为Word应用程序对象后,我使用了相同的代码,但它不起作用
Sub x()将WordApp设置为Word.Application和WordApp.EmailOptions.EmailSignature
请显示初始化WordApp变量的代码。