Macro to have equal size charts and picture in MS Word

U

ucanalways

I am trying to write a macro that will find all excel charts and
pictures in a word document and resize it uniformly equal size and
aligned in the center of the document.

To test, I have one excel chart and a picture in page1. Command button
is also in page1.

Sub test()
ActiveDocument.Shapes.SelectAll
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Left = wdShapeCenter
End Sub

The above code works only when I have iamges in the document. I get an
error (Cannot select mulitple canvas at the same time) when I have
canvas (powerpoint slide) in the document. How to select only the
pictures in a document and align it in the middle? Please help. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top