Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook automation - search for attachments
Message
 
 
To
28/09/2010 22:10:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01483021
Message ID:
01483085
Views:
50
Take a look at this page Setting E-mail Filters (I found that Outlook 2007 has the same options). Scroll down to the bottom of this link - it shows how to create a filter to get messages with attachments only.

Now, since it's possible to do from the interface, it should be possible to do programmatically as well. I believe you need to explore this option.

>that's what i'm after actually naomi - my problem is finding the code that will accomplish this.
>tnx
>k
>
>
>>>this is the start of outlook automation - is there a way to streamline the search so that only emails with attachments are inspected without having to use if clause:
>>>
>>>instead of
>>>
>>>For Each loMSG In loInBox.Items
>>>
>>>along these lines - excuse the syntax
>>>
>>>For Each loMSG loInBox.Items.loAttach  
>>>
>>>
>>>
>>>Local loOutlook   As Outlook.Application
>>>Local loNameSpace As Outlook.NameSpace
>>>Local loInBox     As Object
>>>Local loMSG      As Outlook.MailItem
>>>Local lnUnRead    As Integer
>>>Local loAttach,llAttach
>>>
>>>#Define olFolderInBox      6
>>>
>>>loOutlook   = Createobject('Outlook.Application') &&
>>>loNameSpace = loOutlook.GetNamespace("MAPI")
>>>loInBox     = loNameSpace.GetDefaultFolder(olFolderInBox)
>>>lnUnRead    = 0
>>>
>>>For Each loMSG In loInBox.Items
>>>
>>>
>>>thanks for any suggestions
>>>k
>>
>>May be (just an idea) there is a way to apply a filter first to see only messages with attachments. Try it manually first in Outlook - if it's possible, then you can do this programmatically too.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform