使用VBA更改“使用特定回复进行服务器回复”的操作中的电子邮件文本。

huangapple go评论62阅读模式
英文:

Changing the email text in an "have server reply using specific reply" action with vba

问题

我在Outlook中有以下规则:使用特定回复规则进行服务器回复

我现在的目标是使用VBA脚本更改由该操作发送的电子邮件文本。我们每天发送的响应数据都会更改,所以目前必须手动更改它。我尝试了很多方法,但无法真正找到使用VBA更改文本的可能性。
我也不确定是否可以通过olRuleActionServerReply来实现(因为在观察此操作时没有项目或类似项),还是通过olRuleActionTemplate...
我会感谢在这种情况下的任何提示。提前谢谢!

我尝试在文档中找到有关此问题的任何信息,但没有找到有用的东西。1: https://i.stack.imgur.com/Ca4IC.png

英文:

I have the following rule in outlook:
have server reply using specific reply rule

My aim is now, to change the email text that gets send by the action with a vba script. The data we send out as a respones changes daily, so at the moment we have to change it by hand. I tried now many things, but don't come really to the possibility to change the text with vba.
I'm also not sure if i can get it with olRuleActionServerReply (because it has no item oder similar when i watch this action) or with olRuleActionTemplate...
I'm happy for any hint in this situation. Thank you in advance!

I tried to find anything in the documentation but didn't find anything helpful.

答案1

得分: 0

无法使用不同于消息正文的文本来实现动态回复。您需要设置一个不同的规则或使用VBA处理传入的电子邮件而不涉及规则。

例如,您可以处理应用程序类的NewMailEx事件,在这里您可以检查传入的电子邮件,准备回应并自动发送它。该事件对由Microsoft Outlook处理的每个接收项目触发一次。该项目可以是几种不同的项目类型之一,例如MailItem、MeetingItem或SharingItem。EntryIDsCollection字符串包含与该项目对应的Entry ID。使用Entry ID 调用NameSpace.GetItemFromID方法并处理该项目。

英文:

There is no way to use a dynamic reply with a different text used for the message body. You need to set up a different rule for that or handle incoming emails in VBA without rules involved.

For example, you could handle the NewMailEx event of the Application class where you could check the incoming email and prepare the response and send it automatically. This event fires once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem, MeetingItem, or SharingItem. The EntryIDsCollection string contains the Entry ID that corresponds to that item. Use the Entry ID to call the NameSpace.GetItemFromID method and process the item.

huangapple
  • 本文由 发表于 2023年2月7日 02:32:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/75365265.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定