1. First manually drag and drop the picture to the desired format, click the picture to view the width and height of the picture in the format options
2. Click Macro New in the view
3. Enter the following code in the edit box and save it. Since I only need to unify the width, comment the code with the height and height
Sub image format unified () ' ' Picture format unified macro ' ' ' Myheigth = 12 Mywidth = 14 On Error Resume Next ' Ignore the error For Each iShape In ActiveDocument.InlineShapes ' iShape.Height = 28.345 * Myheigth 'Set the picture height to any cm iShape.Width = 28.345 * Mywidth ' Set the picture width Next For Each Shape In ActiveDocument.Shapes ' Shape.Height = 28.345 * Myheigth 'Set the image height to any cm Shape.Width = 28.345 * Mywidth ' Set the image widthNext End Sub
4. Go back to the macro interface, run, done.