How to Search Outlook Attachments by File Type (PDF, Word, Excel, ZIP and More)
You know the email exists. Someone sent you a PDF contract or an Excel sheet a few months ago. You can’t remember the sender, the subject, or the file name. All you remember is the kind of file.
Outlook can search by file type, but the option is hidden. Most versions have no “file type” dropdown. Instead, Outlook has a small search command for it, and the command works differently depending on which Outlook you use.
This guide covers every version, the commands that matter, and the fixes for when Outlook still doesn’t find your file.
The Quick Answer
Click the search box in Outlook, type the command below and press Enter:
ext:pdf
Replace pdf with any extension: docx, xlsx, pptx, zip or jpg. Outlook then shows emails that carry that type of file.
This works in classic Outlook for Windows. If you use another version, the sections below explain what changes.
Which Outlook Do You Use?
Each Outlook app handles file-type search differently:
| Your Outlook | Best way to filter by file type |
| Classic Outlook (Windows) | ext: search command |
| New Outlook for Windows | Search, then the Files tab and filters |
| Outlook on the web / Outlook.com | Files view with a file-type filter |
| Outlook for Mac | Search bar and Spotlight-based search |
| Outlook mobile app | Basic search with fewer filters |
Not sure which version you have? Classic Outlook has a ribbon with File, Home and Send/Receive. New Outlook has a toggle in the top corner and looks a lot like the web version.
Method 1: The ext: Command in Classic Outlook (Windows)
Outlook MVP Robert Sparnaaij documents these commands on MSOutlook.info. They are the most complete, community-tested reference available.
Step-by-step
- Click the search box at the top of your mail list. The Search tab appears on the ribbon.
Type ext: followed by the file extension. Use no dot and no space:
ext:pdf
ext:docx
ext:xlsx
ext:pptx
- ext:zip
- Press Enter. Outlook lists every email in the current scope that has that file type attached.
Tip: Check the search scope beside the search box. If it says “Current Folder”, Outlook only looks in the folder you are viewing. Change it to Current Mailbox or All Mailboxes to search everything.
Search for more than one file type
Brackets and the word OR do the work here.
- Any of several types: ext:(docx OR pdf OR xlsx)
- Emails with both types attached: ext:(docx pdf)
Write OR and NOT in capital letters. These operators are case-sensitive, so lowercase may not behave as expected.
Exclude a file type
To see every attachment except Word files, use NOT and add hasattachments:yes:
ext:(NOT docx) hasattachments:yes
Do not skip hasattachments:yes. Without it, Outlook also returns every email with no attachment at all, because those emails technically don’t contain a .docx file either.
This also helps with old and new Office formats. For example, ext:(doc NOT docx) finds only the older .doc files.
Combine the file type with a keyword
Say you want PDF attachments related to an invoice:
ext:pdf invoice
This searches the email (body and subject) and its attachment among emails that have a PDF.
To search only inside the attachment and ignore the email text, add attachment::
ext:pdf attachment:invoice
ext:docx attachment:(project budget)
You can also add sender and date filters:
ext:xlsx from:priya received:2025
Method 2: Ribbon Filters (No Typing)
If you don’t like typing commands, classic Outlook has buttons for part of the job.
- Click the search box.
- On the Search tab, click Has Attachments to hide emails without files.
- Open the More dropdown and choose Attachment Contains. A second box appears. Whatever you type there is matched against the attachment.
This finds emails with attachments and searches attachment content, but it does not let you pick “PDF only”. For a specific file type you still need ext:. Many people combine both: click Has Attachments, then add ext:pdf in the search box.
Typing hasattachments:yes in the search box gives the same result as the button. Microsoft documents this in its support article on finding messages with attachments.
Method 3: New Outlook for Windows
New Outlook searches differently. Microsoft’s instructions say to type a keyword (a sender’s name or a word describing the file) in the search bar and select Files to see results that have attachments only. For a stricter filter, click the filter button next to the search box (Advanced Search) and tick Attachments.
Important: I could not confirm from Microsoft’s documentation whether the ext: command works the same way in new Outlook, and community reports are mixed. Microsoft also keeps updating this app. Test it by typing ext:pdf and checking whether the results look right. If they don’t, use the Files tab and filters instead.
Method 4: Outlook on the Web and Outlook.com (Files View)
This is the method most people miss, and it may be the easiest.
Outlook on the web has a Files view. Click the Files icon at the bottom-left of the screen. Instead of a list of emails, you get a list of the actual attachments. From there you can:
- Filter by file type. Open the Filter dropdown and select Word, Excel, PDF and so on. You can select more than one type.
- Filter by date range.
- Sort by name, date or sender.
Microsoft trainer Chris Menard points out that this Files view exists only in Outlook on the web. The desktop version doesn’t have it. If you use classic Outlook and need a quick list of files by type, opening Outlook on the web in your browser is a perfectly good shortcut.
Method 5: Outlook for Mac
Outlook for Mac relies on the Mac’s Spotlight index for search. Type the extension or a keyword in the search box and use the filters on the Search tab. For Mac users, the key point is that search only works well when the Spotlight index is healthy.
If Outlook for Mac returns nothing, Microsoft’s guidance and community answers point to the same fixes:
- Restart Outlook and your Mac.
- Update Outlook to the latest version.
- Check that the Outlook profile is not excluded in Spotlight Privacy (System Settings).
- Rebuild the search index.
Method 6: Outlook on iPhone and Android
The mobile app is the weakest option for file-type search. It has simple search and a few filters, but not the full command set that desktop has. Typing the extension as plain text (like “pdf”) may help a little, but it is less precise.
If you need exact file-type results, use Outlook on the web in your phone’s browser or search from a computer. If attachment search is acting up on your iPhone specifically, this guide on Outlook search not finding attachments on iPhone walks through the fixes.
Why Outlook Finds the Email but Not the Text Inside the Attachment
This is the biggest source of frustration in user forums, and the cause is easy to understand. Searching by file type and searching inside a file are two different jobs.
- Finding “all PDFs” only needs Outlook to read file names and extensions. This almost always works.
- Finding a word inside a PDF needs Outlook to read the file’s text. In classic Outlook, that job belongs to Windows Search, and it needs a “filter” (called an iFilter) for each file type.
According to Sparnaaij, Windows Search indexes over 200 common file types by default. But without a PDF filter, it indexes only the PDF’s file name, not its text. Microsoft Q&A threads show the same pattern: Word and Excel search fine, while PDF content does not. A Microsoft support reply recommends confirming that PDF is enabled in Indexing Options, and one user in the same thread reported that installing a PDF iFilter fixed the problem.
Scanned PDFs are a special case. A scan is just a picture of text. If no OCR (text recognition) was applied, there is no text for the index to read, so searching inside it will never work no matter what you change in Outlook.
Troubleshooting: Search by File Type Returns Nothing
Work through these in order.
1. Check the search scope
Make sure the scope is the whole mailbox, not just the current folder.
2. Check the indexing status
In classic Outlook, click the search box, then go to Search Tools > Indexing Status. If items are still waiting to be indexed, give it time. A large mailbox can take hours.
3. Make sure Outlook is being indexed
Go to File > Options > Search > Indexing Options > Modify and tick Microsoft Outlook.
4. Enable the PDF file type
In Indexing Options, click Advanced, open the File Types tab, and confirm pdf is ticked with a filter that indexes contents.
5. Rebuild the index
In Advanced, under Index Settings, click Rebuild. Leave your PC on with Outlook open. Sparnaaij notes that an overnight run is usually enough.
6. Look at the 250-result limit
One troubleshooting guide notes that classic Outlook shows only 250 search results by default. If your ext:pdf list looks cut off, you may be hitting that cap. Narrow the search with a sender or date.
7. Check Cached Exchange Mode
If you use an Exchange account in Cached Exchange Mode, Outlook can only search what has been downloaded to your device. Old emails that haven’t synced won’t appear. Microsoft Q&A moderators often ask people to test in Outlook on the web: if the web finds the file and desktop doesn’t, the problem is on your PC, not in your mailbox.
8. Create a new Outlook profile
If the index keeps breaking, a new profile is a common last step that moderators suggest.
Related guides
These guides cover related problems in more detail:
- Outlook search not finding attachments for the most common causes of missing files
- Outlook search not working if search fails for everything, not just attachments
- Outlook cannot connect to server if you are offline or the connection keeps dropping, which stops searches from reaching the full mailbox
- Outlook app not working if Outlook freezes or crashes whenever you search
Known Limits Worth Knowing
- ZIP files: There is no direct command that searches inside a ZIP file for a file type. A workaround from MSOutlook.info combines two searches: ext:(pdf) OR (ext:zip attachment:pdf). It is imperfect, so treat results as a starting point.
- Attached emails: Microsoft’s Exchange eDiscovery documentation explains that the attachment: property compares against file names of attached files, and attached emails (a message inside a message) are handled differently. So attachment: can miss them. If this affects you, try a plain keyword search without the attachment: command.
- Inline images: Pictures in the body of an email, like signature logos, are not always counted as real attachments. If ext:jpg returns lots of logos, add a sender or date filter to cut the noise.
- Versions change: Microsoft keeps updating Outlook, especially new Outlook. If a step doesn’t match your screen, the principle usually still holds.
Quick Cheat Sheet
| What you want | Type this |
| All emails with any attachment | hasattachments:yes |
| PDFs only | ext:pdf |
| Word or Excel files | ext:(docx OR xlsx) |
| PDFs containing a word | ext:pdf attachment:budget |
| Everything except Word | ext:(NOT docx) hasattachments:yes |
| PDFs from one person | ext:pdf from:name |
| PDFs from a certain year | ext:pdf received:2025 |
Frequently Asked Questions
How do I search Outlook for only PDF attachments?
Type ext:pdf in the Outlook search box and press Enter. In Outlook on the web, open the Files view and use the Filter dropdown to choose PDF.
Can Outlook search for text inside attachments?
Yes, in many cases. Use attachment:yourword. In classic Outlook this depends on Windows Search being able to read that file type. PDFs often need a working PDF filter, and scanned PDFs without OCR cannot be searched by text.
How do I find all emails with attachments in Outlook?
Type hasattachments:yes in the search box, or click Has Attachments on the Search tab in classic Outlook. In new Outlook and Outlook on the web, use the filter button and tick Attachments.
Why does ext: not work in my Outlook?
Most often it is the search scope, an incomplete index, or the version you use. Classic Outlook supports ext: best. If you use new Outlook or the web version, try the Files tab and filters instead.
Can I search for multiple file types at once?
Yes. Use ext:(docx OR pdf OR xlsx) and keep OR in capital letters.
Does Outlook search work inside ZIP files?
Not directly. You can find emails that have a ZIP attached with ext:zip, but Outlook has no dedicated command to filter by the file type inside the ZIP.
Final Thoughts
Search by file type feels hidden because Outlook never shows you the command. Once you know ext:, the Files view on the web, and the indexing fixes, finding any attachment takes a few seconds.
Two habits save the most time. First, always set the search scope to the whole mailbox before hunting for something old. Second, if you often look for the same thing (like every invoice PDF), save it as a Search Folder in classic Outlook so you never retype the command.