How to count the number of images in a Word document?
When working with Word documents, knowing exactly how many images are included can be important for meeting submission standards, monitoring content for reports, or keeping track of document structure for editing and publishing purposes. In lengthy or complex documents, manually counting every image is not only time-consuming but also leaves room for mistakes—images in headers, footers, or floating objects can easily be overlooked. That’s why mastering efficient methods to count images—whether they are inline, floating, or present in multiple files—can save you substantial time while improving document accuracy.
This tutorial explains practical methods for counting different types of image objects in Word, including inline pictures and floating shapes. With these methods, you can quickly determine image counts in a single document or even across multiple files, making document management and quality control more effective.
Count the number of inline images with Find and Replace feature
Count the number of inline images in multiple documents using Kutools for Word
Count the number of both inline images and floating shapes with VBA code
Count the number of inline images using the Find and Replace feature
The Find and Replace function in Word enables you to quickly tally inline images, making it a practical choice when you need an instant count in a single document. Inline images are pictures that behave like text characters and flow with the text. Note that this method does not count floating shapes such as text boxes, drawn shapes, or images formatted as "in front of text." It is most suitable when you want a quick count of regular inserted images, especially for compliance or layout review.
- Click Home > Find > Advanced Find.

- In the Find and Replace dialog box, go to the Find tab. Enter ^g (which is the special code for graphics, including inline pictures) into the Find what box. Then, to search the main content of your document, select Main Document from the Find In dropdown.

- Word will instantly report the total number of inline images matching your criteria, displaying the count at the bottom of the dialog box. The highlighted count represents the number of graphics (inline images) present in the main body of your document.

Tips and reminders: This method counts only inline images; floating objects such as images anchored to a paragraph or inserted as shapes will not be included. For more comprehensive counts, consider the VBA solution below. Also, ensure you are searching within the correct section (Main Document, not Header, Footer, etc.), as image content in those areas will be excluded.

Office Tab
Tabbed navigation for Word, Excel, PowerPoint, and more—just like a web browser, with smooth switching in one window.
Count the number of inline images in multiple documents using Kutools for Word
For situations where you need to evaluate image content across several documents simultaneously—such as compiling reports, batch editing, or fulfilling submission requirements for multiple files—Kutools for Word is an efficient solution. With its Batch Replacement feature, you can automate the process of searching for and counting inline images (using the ^g code) in a group of selected documents at once. This approach is especially helpful when manual document review would otherwise be slow and repetitive.
Kutools for Word
Kutools for Word helps you handle everyday document tasks faster with practical tools built right into Microsoft Word—no coding, no complex setup.
- AI writing, polishing, translation, and summarization
- Batch find and replace across documents
- Merge and split Word documents easily
- Batch Word ↔ PDF conversion
- On the Kutools tab, choose Batch Replacement to open the specialized dialog.

- In the Batch Find and Replace dialog box, set up the search as follows:
- Click Add Row to insert a new search rule.
- In the new row’s Find field, enter ^g, which corresponds to all inline image placeholders in Word.
- Click Add and select either Add Files or Add Folder to fetch the documents you want to analyze. Both options allow you to select one or more Word documents at once based on your needs.
- Click Find to start the batch counting process.

- The system will switch to the Preview Result tab in the dialog box. Here, you will see a detailed count of inline images for each document you included, making it easy to spot files that meet or fall short of your image-related requirements. After reviewing the results, click Close to exit.

This batch method ensures you keep track of image counts across multiple documents without having to open each one individually. It’s ideal for editors, researchers, or anyone working with a set of documents that need consistent formatting.
Count the number of both inline images and floating shapes with VBA code
Unlike the previous two methods, which are limited to inline images, using VBA (Visual Basic for Applications) allows you to count both inline images and floating shapes—including images inserted as shapes, watermarks, and more—in the main document body. This method is valuable if your document includes content formatted as floating images or other objects that move independently of the text, ensuring a more comprehensive and accurate count. Additionally, this approach can be customized for specific counting requirements.
- Select the document in which you want to count images, or place your cursor within the document window. Press Alt + F11 to open the Microsoft Visual Basic for Applications editor window.
- In the VBA editor, click Insert > Module to create a new module. Copy and paste the VBA code below into this module.
VBA code: Count the number of inline images and floating shapes in the active document
Sub CountImagesInDoc() Dim xInlines As Long Dim xFloaters As Long Dim sh As Shape Dim tbxs As Long Dim xPrompt As String On Error Resume Next xTitleId = "KutoolsforWord" With Application.ActiveDocument For Each sh In .Shapes If sh.Type = msoTextBox Then tbxs = tbxs + 1 End If Next xInlines = .InlineShapes.Count xFloaters = .Shapes.Count - tbxs End With xPrompt = "Inline images:" & vbTab & xInlines & vbCr xPrompt = xPrompt & "Floating shapes:" & vbTab & xFloaters & vbCr xPrompt = xPrompt & vbTab & "Total:" & vbTab & (xInlines + xFloaters) & vbCr xPrompt = xPrompt & "Counts do not include headers and footers, etc." MsgBox xPrompt, vbInformation, xTitleId Set sh = Nothing End Sub - After pasting the VBA code, press the F5 key or select Run to execute the code. A prompt will appear showing the count of inline images, floating shapes, and their total sum.

Best Office Productivity Tools
Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!
🤖 Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish (Preserve Format) / Super Translate (Preserve Format) / AI Redaction / AI Proofread...
📘 Document Mastery: Split Pages / Merge Documents / Export Selection in Various Formats (PDF/TXT/DOC/HTML...) / Batch Convert to PDF...
✏ Contents Editing: Batch Find and Replace across Multiple Files / Resize All Pictures / Transpose Table Rows and Columns / Convert Table to Text...
🧹 Effortless Clean: Sweap away Extra Spaces / Section Breaks / Text Boxes / Hyperlinks / For more removing tools, head to the Remove group...
➕ Creative Inserts: Insert Thousand Separators / Check Boxes / Radio Buttons / QR Code / Barcode / Multiple Pictures / Discover more in the Insert group...
🔍 Precision Selections: Pinpoint Specific Pages / Tables / Shapes / Heading Paragraphs / Enhance navigation with more Select features...
⭐ Star Enhancements: Navigate to Any Location / Auto-Insert Repetitive Text / Toggle Between Document Windows / 11 Conversion Tools...
🌍 Supports 40+ Languages: Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Office Tab - Brings Tabbed interface to Office, Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
✨ Kutools for Office – One Installation, Five Powerful Tools!
Includes Office Tab Pro · Kutools for Excel · Kutools for Outlook · Kutools for Word · Kutools for PowerPoint
📦 Get all 5 tools in one suite | 🔗 Seamless integration with Microsoft Office | ⚡ Save time and boost productivity instantly
Best Office Productivity Tools
Kutools for Word - 100+ Tools for Word
- 🤖 Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish / Super Translate / AI Redaction / AI Proofread
- 📘 Document Mastery: Split Pages / Merge Documents / Batch Convert to PDF
- ✏ Contents Editing: Batch Find and Replace / Resize All Pictures
- 🧹 Effortless Clean: Remove Extra Spaces / Remove Section Breaks
- ➕ Creative Inserts: Insert Thousand Separators / Insert Check Boxes / Create QR Codes
- 🌍 Supports 40+ Languages: Kutools speaks your language – 40+ languages supported!






