My first thought would be to create a search folder to put the messages with attachments and then use your code to loop thru them
http://office.microsoft.com/en-us/outlook-help/find-every-e-mail-message-with-an-attachment-HA001121668.aspx[Update]
I think for Outlook 2007 the procedure is a little bit different: Right click on "Search Folders" and click "New Folder" then scroll down to find the "Mail with attachments"
>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
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges