我有 VBA 代码可将电子邮件转发到特定帐户。它有效,除非转发的电子邮件具有转发者的电子邮件地址。
邮件转发后如何保留原来的发件人邮箱地址作为回复?
Sub AutoForwardAllSentItems(Item As Outlook.MailItem)
Dim strMsg As String
Dim autoFwd As Outlook.MailItem
Set autoFwd = Item.Forward
autoFwd.Recipients.Add "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fe9387a19b939f9792be9a91939f9790d09d9193" rel="noreferrer noopener nofollow">[email protected]</a>"
autoFwd.Send
Set autoFwd = Nothing
End Sub
最佳答案
so there is no way? really? – Mike 7 hours ago
Riking 提到 Outlook 不允许您修改电子邮件中包含的 header ,这是正确的。我猜测他指的是 .SenderEmailAddress
属性。您无法修改 .SenderEmailAddress
,因为此属性是只读的。
话虽如此,您可能还想使用另一个属性。 .SentOnBehalfOfName
此处有更多详细信息
主题:SentOnBehalfOfName 属性
链接:http://msdn.microsoft.com/en-us/library/aa171998%28v=office.11%29.aspx
引用上述链接
Returns a String indicating the display name for the intended sender of the mail message. This property corresponds to the MAPI property PR_SENT_REPRESENTING_NAME. Read/write.
expression.SentOnBehalfOfName
expression Required. An expression that returns a MailItem object.
另请参阅此链接
主题:自动设置新 Outlook 邮件的“发件人”地址
引用上述链接
Setting an alternate reply address is particularly useful if you are using a mail enabled public folder or distribution list for a group of users and would like the replies to messages that they send to go to the group smtp address instead of the sender’s mailbox.
HTH
关于vba - Outlook 自动转发将回复设置为原始发件人而不是转发者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10528075/