VBA & Macro Problems

Select and Resize Graphics While Recording a Word Macro

Maira MehtabMaira Mehtab Nov 20, 2026 868 views

Question details

The user needs to select and resize graphics while recording a Microsoft Word macro.

How to Select and Resize Graphics While Recording a Word Macro
Product
Microsoft Word
Device & OS
not provided
Scenario
Recording a macro to automate the selection and resizing of images or other graphics in a Word document.
Observed behavior
The macro recorder does not reliably capture mouse actions used to select or resize graphics.
Before you start

Open a document containing a sample graphic and identify whether it is inline with text or floating. Make the Developer tab visible through Word's ribbon settings if you plan to record or run a macro.

Solution 1Recommended

Use Select Objects While Recording the Macro

Try Word's Select Objects command to select a floating graphic during recording.

1
Start recording

In Word, open Developer > Record Macro, name the macro, and select OK.

2
Select the graphic

Go to Home > Select > Select Objects, then click the floating image or graphic.

3
Resize and stop

Use the Picture Format or Shape Format tab to enter the desired size, then choose Developer > Stop Recording.

4
Test the macro

Open Developer > Macros, select the recorded macro, and choose Run to check whether selection and resizing were captured.

Use Select Objects While Recording the Macro
Selection may not be recorded: Select Objects is intended for floating objects, not pictures set to In Line with Text. Word may still fail to record the selection; use VBA if the recorded macro does not work.
Free Microsoft Office alternative

Resize Word Documents' Pictures with WPS Writer

WPS Office is a free, lightweight Office alternative with a familiar interface. Open compatible Word documents in WPS Writer to edit text and resize pictures, making it easy to continue working across office suites. It does not fix Microsoft Word's macro recorder.

Select and resize document pictures with familiar formatting toolsOpen and edit Microsoft Word formats such as DOC and DOCXWork in a free, lightweight office suiteUse a familiar interface when moving from Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Word macro skip the image I clicked?

Word's macro recorder does not reliably capture mouse-based object selection. Try Home > Select > Select Objects for a floating graphic, or write the selection and resizing logic in VBA.

Why can't Select Objects select my picture?

The picture may be set to In Line with Text. Select Objects is intended for floating objects; check the picture's layout options or use VBA designed for inline pictures.

Can I resize all inline pictures with one macro?

Yes. In Developer > Visual Basic, add a module that loops through ActiveDocument.InlineShapes and sets the Width of each picture. Set LockAspectRatio to True to preserve proportions.

How do I keep a VBA macro in my Word document?

Choose File > Save As and save the document as a Word Macro-Enabled Document (.docm). A standard DOCX file cannot store VBA macros.