vba - 无法在 Microsoft Outlook VBA 中使用 EmailOptions 属性
问题描述
我正在尝试使用 EmailOptions 属性。我在 Microsoft Docs ( https://docs.microsoft.com/en-us/office/vba/api/word.emailoptions ) 上找到了示例,我正在尝试。但它给出了错误:“对象不支持此属性或方法”
我添加了对 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
对象公开。
推荐阅读
- axon - Axon:在 Spring Boot 应用程序中使用 AxonServer 而不是定义的 JPA 数据源
- scala - 如何用不同的证据重载泛型方法而没有歧义?
- android - 是否可以使用 iOS 和 Android 设备创建蓝牙 Mesh 网络
- mule - 是否可以使用 mule 4 API 在运行时更改处理器的行为?
- ios - Stepper 更改后从单元格获取 indexPath
- arrays - Arduino:来自 int 二维数组的奇怪值?
- apache-spark - LivyClient uploadJar 失败并出现 py4j.Py4JException:获取新通信通道时出错
- ios - 如何从扩展访问变量并在 Swift 的视图控制器中使用它
- regex - 树层次结构字符串提取的正则表达式
- applescript - 如何在 AppleScript 中使用侧边栏?