Impossible to access newly arrived mails?

T

typingcat

A few days ago, I post the following message to this newsgroup.

Title: Simple VBA code for this please.
Outlook's built-in filter doesn't provide the detailed things I need so
I want to filter it with my own VBA script. But I don't know where to
start. Please give a simple code for this operation. Then I'll be able
to start writing more advanced code using that code as an initiative.

EVENT Retrieving mails
{
FOREACH mail IN retrieved mails
{
IF ( mail's address ends with "@yahoo.co.cn")
{
DELETE mail
}
}
}

But I've got no reply. Perhaps, because this is impossible? If it is
please let me know. I don't want to try something never can be done.
Thank you.
 
T

TC

The basic constructs of the VBA language are constant from product to
product. Eg. a WHILE loop is a WHILE loop, regardless of whether you
program it in Access VBA, Word VBA, Excel VBA, and so on.

The difference (between products) lies in their so-called "object
models". For example, Access has a Form object which can be used to
manipulate an Access form through code. Similarly, Word has a Document
object which can be used to manipulate a document through code. But the
Access Form object does not make sense to Word, and the Word "Document"
object has a totally different meaning to Access.

So, to do what you want, you need to read-up on the object model of
Microsoft Outlook. Googling on this will get you lots of hits:

outlook "object model"

Here is the first one I found. Maybe start from this:

http://support.microsoft.com/?kbid=208527

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top