Home › Tools › Outlook search builder
Free tool · Outlook

Outlook search builder for attachments and invoices

Choose your Outlook version, tick what you are looking for (attachments, file type, sender, words like invoice or receipt, dates, unread, size) and get a search you can paste straight into Outlook. No sign-up, and nothing leaves your browser.

Classic Outlook for Windows · New Outlook for Windows · Outlook on the web and Outlook.com · Every keyword checked against Microsoft's own help pages

Start from a template (optional)

One click fills in the form; then adjust anything you like. Dates are calculated from today's date on your device.

Your Outlook version

The syntax differs between them. The builder only uses keywords Microsoft documents for the version you pick, and warns you about anything else.

Attachment file type

None ticked = any file type. Several are combined with OR.

Part of the file name, for example a supplier's prefix or an invoice number.

Words to look for

Any one of them is enough (OR). Phrases with spaces are put in quotes. Outlook matches the start of words, so invoice also finds "invoices".

Email address or display name; several, comma separated.

Leave out newsletters and notifications.

Useful if invoices arrive at an alias or shared mailbox.

Ranges are written as received:7/1/2026..9/30/2026 (both days included). Quarters are calendar quarters (Q1 = Jan–Mar).

Microsoft's examples use month/day/year. Outlook.com requires MM/DD/YYYY, so this option is locked for the web.

Size of the whole email, attachments included.

Outlook sets this with the search scope, not with a keyword. See "How to run it".

Your search for classic Outlook

    How to run it

      Built in your browser; nothing is sent to any server. Outlook does not offer a documented link that opens a search, so paste it into the search box yourself.

      Found them? Now stop doing it by hand

      A search shows you where the invoices are. You still have to open each email and save each attachment yourself. Inbox2Drive does that part automatically for Outlook.com, Hotmail and Microsoft 365 mailboxes.

      Stop searching — have Outlook attachments saved to Google Drive or OneDrive automatically. Free to start.

      What each Outlook search keyword does (and where it works)

      Type keywords into the Outlook search box with no space after the colon. A space between two keywords means "and". AND, OR and NOT must be in capitals. "Documented" means Microsoft lists it for that version in the sources at the end of this section; "not documented" means it may or may not work, and we don't claim that it does.

      KeywordWhat it doesClassic OutlookNew OutlookWeb / Outlook.com
      hasattachments:yesEmails with at least one attachment. This is the form Microsoft's "Find all messages with attachments" page gives for classic Outlook.Documented [2]Not documented (use the singular)Not documented (use the singular)
      hasattachment:yes
      hasattachment:true
      Same result. hasattachment:no finds emails without attachments (documented for Outlook.com).Documented [1]Documented [1]Documented [1][3]
      attachments:invoice.pdfAttachment whose name contains that text. Listed in Microsoft's Advanced Query Syntax reference (example attachment:presentation.ppt), but not in the current Outlook help article. Test it in your version.AQS reference only [4]Not documented (type the file name as a plain word)Not documented (type the file name as a plain word)
      from: · to: · cc:Sender, recipient or Cc. Accepts an address or a display name; use quotes for names with spaces: from:"Acme Billing".Documented [1]Documented [1]Documented [1][3]
      subject:A word or quoted phrase in the subject line: subject:"credit note".Documented [1]Documented [1]Documented [1][3]
      received:1/15/2026Received on that date (month/day/year in Microsoft's examples; Outlook.com requires MM/DD/YYYY).Documented [1]Documented [1]Documented [3]
      received:"this week"Relative dates. Classic and new Outlook: today, yesterday, "this week", "last week", "last month", "last year". Outlook.com lists today, yesterday, this week, last week, past month (plus future ones). Names of days and months are no longer supported in classic Outlook.Documented [1]Documented [1]Documented (its own list) [3]
      received:7/1/2026..9/30/2026Date range with two dots, both ends included.AQS reference [4]Not documented (use the date filter if ignored)Documented [3]
      read:no · read:falseUnread emails only.Documented [1]Documented [1]Not in the Outlook.com keyword table (use the Unread filter)
      messagesize:>5 MBEmails bigger (>) or smaller (<) than a size. Classic also accepts names such as messagesize:enormous; Microsoft notes those names don't work in new Outlook.Documented [1]Documented (comparison form only) [1]Not in the Outlook.com keyword table
      category:Emails with a category whose name contains that text: category:invoices.Documented [1]Documented [1]Documented [3]
      AND · OR · NOTCombine or exclude terms; capitals required. Group with parentheses: (invoice OR receipt).Documented [1]Documented [1]AND / OR documented [3]
      -from: (minus)Excludes emails matching that property: -from:newsletter@store.com.Not documented (use NOT)Not documented (use NOT)Documented [3]
      " " · invoice*Quotes for an exact phrase. Outlook.com supports only suffix wildcards (inv*); desktop Outlook matches word beginnings automatically ("prefix matching").Quotes documented [1]Quotes documented [1]Documented [3]

      Sources (Microsoft): [1] How to search in Outlook (applies to classic Outlook, new Outlook for Windows, Outlook on the web and Outlook.com) · [2] Find all messages with attachments in Outlook · [3] Search Mail and People in Outlook.com · [4] Advanced Query Syntax reference (Windows Search; Microsoft marks this page as covering an older version). Checked November 2026.

      New Outlook and the web also have point-and-click filters. After you type in the search box, Microsoft documents a filter button with an Attachments box, a Has attachments option and Sort › Has files. If a keyword is ignored, those filters are the reliable fallback. Classic Outlook has a Has Attachments button on the Search ribbon.

      8 ready-made Outlook searches for invoices and attachments

      Copy the line for your version. Replace the example addresses and dates with your own. The date examples use Q3 2026 (July 1 to September 30).

      1. Every email with an attachment

      Classic Outlookhasattachments:yes New Outlook · Web / Outlook.comhasattachment:yes

      2. Invoices received last month

      Classic · New Outlookhasattachment:yes subject:invoice received:"last month" Web / Outlook.comhasattachment:yes subject:invoice received:10/1/2026..10/31/2026

      "Last month" is not in the Outlook.com list of relative dates, so the web version uses an explicit range (here October 2026).

      3. PDF invoices from one supplier

      Classic Outlookhasattachments:yes attachments:pdf from:billing@supplier.com New Outlook · Web / Outlook.comhasattachment:yes pdf from:billing@supplier.com

      Outside classic Outlook, "pdf" is searched as a plain word because no attachment-name keyword is documented there.

      4. Receipts or invoices this week

      Classic · New Outlook · Webhasattachment:yes (subject:receipt OR subject:invoice) received:"this week"

      5. Receipts for a whole quarter (Q3 2026)

      Classic Outlook · Web / Outlook.comhasattachment:yes subject:receipt received:7/1/2026..9/30/2026

      In new Outlook the two-dot range is not documented; if it is ignored, use the date fields in the search filters.

      6. Unread emails with attachments

      Classic · New Outlookhasattachment:yes read:no Web / Outlook.comhasattachment:yes

      On the web, add the Unread filter instead; read: is not in the Outlook.com keyword table.

      7. Attachments bigger than 5 MB

      Classic · New Outlookhasattachment:yes messagesize:>5 MB

      No size keyword is documented for Outlook on the web.

      8. Invoices in English or Spanish, without newsletters

      Classic · New Outlookhasattachment:yes (invoice OR factura) NOT from:newsletter@store.com Web / Outlook.comhasattachment:yes (invoice OR factura) -from:newsletter@store.com

      Common mistakes with Outlook search

      Why searching isn't enough

      A good search tells you where your invoices are. It doesn't move them anywhere. After the search you still have to open each email, save each attachment, rename it so you can find it later, and put it in the right folder for your bookkeeper or accountant. Then you do it again next month, and again for every other mailbox you use.

      Outlook itself won't automate that step: its rules can move or flag emails, but there is no rule action that saves attachments into a OneDrive or Google Drive folder. You can save attachments one at a time, or several at once from a single email. Our guides cover the manual and semi-automatic options:

      Inbox2Drive does the saving for you. It connects Outlook.com, Hotmail and Microsoft 365 mailboxes (as well as Gmail and IMAP), classifies each attachment with AI (invoice, receipt, contract, statement…) and saves it into organized folders in Google Drive, OneDrive or Dropbox, by type, date or sender. It never sends or deletes your email.

      FAQ

      Is this tool free? What does it do with my data?

      It is free and runs entirely in your browser: the search is built on your device and nothing is sent to any server. It never connects to your mailbox; you copy the search and paste it into Outlook yourself.

      Is it hasattachments:yes or hasattachment:yes?

      Microsoft documents both. Its page on finding messages with attachments tells classic Outlook users to type hasattachments:yes, and its general Outlook search article lists hasattachment:yes (or hasattachment:true). The Outlook.com search help uses HasAttachment:yes. If one spelling returns nothing in your version, try the other, or use the Has Attachments / Attachments filter instead.

      Does Outlook on the web use the same search syntax as the desktop app?

      Only partly. from:, to:, subject:, received: and hasattachment: are documented for both. The Outlook.com help also documents date ranges with two dots (..) and excluding with a minus sign, but its keyword table does not list attachments:, read: or messagesize:. For those, use the Filters panel in Outlook on the web. This builder only uses what Microsoft documents for the version you choose and flags anything else.

      Why can't Outlook find an invoice I know I have?

      Common reasons: the date is in the wrong order (Outlook.com requires MM/DD/YYYY), the search scope is only the current folder while the email is in Archive, Junk or Deleted Items, the invoice arrived as a download link rather than an attachment, or the file is a ZIP or XML instead of a PDF. Also note that Outlook ignores number strings shorter than five digits when matching partial numbers, so search for the full invoice number.

      Is Outlook search KQL or AQS?

      The search box in Outlook uses Advanced Query Search (AQS) keywords such as from:, subject: and received:. Keyword Query Language (KQL) is the related syntax that administrators use in Microsoft Purview eDiscovery searches, with properties such as attachmentnames: and received>=. Many keywords look alike, but KQL examples are not guaranteed to work in the Outlook search box.

      Can Outlook save these attachments to OneDrive or Google Drive automatically?

      Not with search alone. Outlook lets you save attachments individually, and its rules have no action that files attachments into a cloud folder. To automate it you need something like Power Automate, a script, or a tool such as Inbox2Drive, which saves Outlook attachments to Google Drive or OneDrive as they arrive.

      Keep reading

      Stop searching for invoices every month

      Stop searching — have Outlook attachments saved to Google Drive or OneDrive automatically. Free to start. Works with Outlook.com, Hotmail and Microsoft 365.

      Create a free account

      Questions? Email us at marketing@inbox2drive.com