英文:
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。EntryIDsCollectio
n字符串包含与该项目对应的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 EntryIDsCollectio
n string contains the Entry ID that corresponds to that item. Use the Entry ID to call the NameSpace.GetItemFromID method and process the item.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论