Automatically save attachments to a Windows folder.
Attachment Save
Discount code: BH93RF24

Find messages with attachments by file extension

Outlook can find emails with one or more attachments by specifying the “Has Attachments” option.

But how can I search for a specific type of attached file?
e.g. search for emails having .doc, .pdf, .xls or .zip files etc.

Searching for a specific type of file isn’t directly supported by a search option, but you can do this by typing the search command ext:<extension> manually.

  • ext:doc
  • ext:pdf
  • ext:xls
  • ext:zip

Instant Search - Find messages with attachments by file extension
A short but effective search command.

Note: In Windows Vista and Windows 7, you can also use this in the Search field of the Start Menu or Explorer.

Search for multiple attachment types in one search

If you want to search for messages which contain at least 2 specific type of file attachments, you’ll have to enclose your search in round brackets after you specify the ext: search command;

  • ext:(doc pdf)
  • ext:(xls zip)

If you want to search for messages which contain at least one of the file types, you must use the OR statement (case sensitive!);

  • ext:(doc OR pdf)
  • ext:(xls OR zip)
  • ext:(doc OR pdf OR xls OR zip)

Exclude attachment types

If you want to exclude a specific file type from your search, you can use the NOT statement (case sensitive!). This can be useful when you want to search for doc files specifically and not also include docx files in your results.

  • ext:(doc NOT docx)
  • ext:(xls NOT xlsx)

To search for all attachments except for some specific types, you must also include the command hasattachments:yes or you’ll also get all messages without attachments returned;

  • ext:(NOT doc) hasattachments:yes
  • ext:(NOT doc NOT pdf NOT xls) hasattachments:yes

Search in attachment and message body text

You can combine this with a regular search term to look in the message itself as well as in the attachment

  • ext:doc your search text
  • ext:(doc OR pdf) your search text

Search in attachment text only

If you only want to search within the attachment, you’ll have to specify the attachment: field as well;

  • ext:doc attachment:outlook
  • ext:pdf attachment:(search with multiple words)

Search for file types inside zip-files

Sadly, there is no specific search command to also include zip-files which contain a specific file type in the results. For instance, to return all doc-files and all zip-files which contain a doc-file.

You can achieve a close approximation by using an OR statement which searches within the zip-file for a specific word in the contained files (which includes the file extension);

  • ext:(doc) OR (ext:zip attachment:doc)
  • ext:(pdf) OR (ext:zip attachment:pdf)

As said, this won’t be an exact search as it will also return messages with zip-files attached which have files containing the word doc or pdf in them.

Note: For more about using Instant Search commands in Outlook see the guide; Instant Search query commands reference



Sperry Software
Use "BH93RF24" to get a discount when ordering!