尝试在 outlook 2010 中创建一个按钮,用于回复突出显示的 email/open 带有/静态文本的电子邮件和抄送电子邮件地址

Trying to create a button in outlook 2010 that replys to highlighted email/open email w/ static text and cc's an email address

除了将电子邮件地址添加到抄送之外,一切似乎都正常。 我正在测试的帐户可能对 GAL 隐藏。

还有一种方法可以将用户的显示名称添加到正文中,即 Great Job(动态名称,即 Ted,即我正在回复的电子邮件发送)!我喜欢你的工作。 . .

使用 windows 7 enterprise w/ outlook 2010 professional Plus 32bit 和 exchange 2010。

谢谢!下面的代码

Sub GoodJob()

Dim m As MailItem 'object/mail item iterator
Dim recip As Recipient 'object to represent recipient(s)
Dim reply As MailItem 'object which will represent the reply email

'Loop over each SELECTED item:
For Each m In Application.ActiveExplorer.Selection
If m.Class = olMail Then
Set reply = m.reply

'Adds a "direct replies to" address:
'Set recip = reply.ReplyRecipients.Add("g@g.com")
Set recip = reply.ReplyRecipients.Add("someperson@a.net")
recip.Type = olCC

'adds Subject "Great Job! I loved your work on this Project" to email
 reply.Subject = "Great Job ! I loved your work on this Project"

'Adds Body of text to email
reply.Body = "Your awesomeness has been shared with Driver X" & vbLf &   m.Body



reply.Save 'saves a draft copy to your SENT folder
reply.Send

End If
Next

End Sub

在这种情况下不是 ReplyRecipients 只是收件人。

Set recip = reply.Recipients.Add("someperson@a.net")