【问题标题】:Empty HTML Body while creating Outlook meeting invite using VBA使用 VBA 创建 Outlook 会议邀请时为空 HTML 正文
【发布时间】:2021-12-29 14:39:11
【问题描述】:

我正在尝试创建 Outlook 会议邀请。

会议邀请已创建。主题和其他字段也会更新。

当我使用.HTMLBody 时,我得到了一个空的身体。

我试过的代码:

Set OutApp = Outlook.Application
Set OutMeet = OutApp.CreateItem(olAppointmentItem)

With OutMeet
    .Subject = Subj
    .RequiredAttendees = ActiveSheet.Range("G9").Value
    ThisWorkbook.Sheets("Sheet1").Select
    .Start = ThisWorkbook.Worksheets("Sheet1").Range("D2").Value
    .Duration = 10
    .Importance = olImportanceHigh
    .ReminderMinutesBeforeStart = 15
    ThisWorkbook.Sheets("Sheet2").Select
    .BodyFormat = olFormatHTML
    .HTMLBody = "<html><head></head><body>Hi</body></html>"
    Application.Visible = True
    MeetingStatus = olMeeting
    .Location = "Microsoft Teams"
    .Display
End With
Set OutMeet = Nothing
Set OutApp = Nothing
End Sub

【问题讨论】:

    标签: html excel vba outlook


    【解决方案1】:
    【解决方案2】:

    确保您已打开 Outlook 参考库,然后尝试

    .Body = "嗨"

    这对我有用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-04-09
      • 1970-01-01
      • 1970-01-01
      • 2015-04-14
      • 1970-01-01
      • 1970-01-01
      • 2011-01-22
      相关资源
      最近更新 更多