Outlook邮件新邮件问题 [英] Issue with Outlook Event for New Mail

查看:122
本文介绍了Outlook邮件新邮件问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想当一个新邮件来到邮箱时做一些操作。因为我正在使用Item_Add()事件

I would like to do some operation when a new mail comes to mailbox. For that I am using Item_Add() Event

Private Sub myOlItems_ItemAdd(ByVal Item As Object)
   ... Do Something
Exit Sub

有谁可以告诉我如何设置gilbertojperera@gmail.com下的收件箱文件夹的处理程序?

Can anyone tell me How to set the Handler for "inbox" folder under "gilbertojperera@gmail.com"?

问题:

我在这里遇到的问题是,即使当新邮件进入Outlook数据文件下的收件箱文件夹时,这个问题也会被触发。但是我曾经在第二个红色箭头(第三个最后一个文件夹)标记的另一个收件箱文件夹中收到邮件。

The issue I am facing here is that this even get fired only when a new mail comes in "Inbox" folder under "Outlook Data File". But I used to receive mails in the other "Inbox" folder marked by second red arrow (third last folder)

由于这个问题我的Item_Add()事件不是触发&导致我的外观宏失败。

Due to this problem My Item_Add() event is not being triggered & resulting to my outlook macro Fail.

如果您有一些有价值的输入,请帮忙。

Please do help if you have some valuable inputs.

推荐答案

听起来你只是初始化了Inbox DefaultFolder(olFolderInbox)的处理程序。您还必须为gilbertojperera@gmail.com的收件箱文件夹添加一个处理程序。

It sounds like you only initialized the handler for the Inbox DefaultFolder (olFolderInbox). You also must add a handler to the Inbox folder for gilbertojperera@gmail.com.

这篇关于Outlook邮件新邮件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆