将多个与会者添加到会议邀请

我尝试了以下两种方式来添加多个与会者,但只有最后一个电子邮件地址在.To区域中声明。将多个与会者添加到会议邀请

测试1:失败

.RequiredAttendees = "[email protected];" 

.RequiredAttendees = "[email protected]"

测试2:失败

.RequiredAttendees = "[email protected]; [email protected]" 

以下是完整代码:

Sub MeetingInvite() 

Dim rng As Range

Dim OutApp As Object

Dim OutMail As Object

With Application

.EnableEvents = False

.ScreenUpdating = False

End With

Set OutApp = CreateObject("Outlook.Application")

Set OutMail = OutApp.CreateItem(1)

On Error Resume Next

With OutMail

.RequiredAttendees = "[email protected];"

.RequiredAttendees = "[email protected]"

.Subject = "Meeting"

.Importance = True

.Body = "Meeting Invite" & Format(Date)

.Display

End With

Set OutMail = Nothing

Set OutApp = Nothing

Unload Emy

End Sub

的代码创建一个邀请,但我需要添加大约30封电子邮件地址。

回答:

您正在尝试更改RequiredAttendees。此属性仅包含所需参加者的显示名称。

应使用收件人集合设置与会者列表。 试试这个:

With OutMail 

.Recipients.Add ("[email protected]")

.Recipients.Add ("[email protected]")

.Subject = "Meeting"

.Importance = True

.Body = "Meeting Invite" & Format(Date)

.Display

End With

或者,如果你想从纸张阅读与会者:

With OutMail 

For Each cell In Range("C2:C10")

.Recipients.Add (cell.Value)

Next cell

.Subject = "Meeting"

.Importance = True

.Body = "Meeting Invite" & Format(Date)

.Display

End With

当然,如果你真的想通过邮件邀请30人,这可能是明智的安排那会议提前几天,而不是今天邀请他们...

以上是 将多个与会者添加到会议邀请 的全部内容, 来源链接: utcz.com/qa/257523.html

回到顶部