Home > Net >  Select Picture Inside a Textbox Shape
Select Picture Inside a Textbox Shape

Time:12-13

I have a document with Picture inside a textbox. I just want to select that picure inside textbox and get its picture properties using VBA in word

I have tried to select all contents of the textbox but that results in error in getting picture properties.

Any suggestions how it can be done?

CodePudding user response:

If there is text inside the textbox as well as the picture it will be an InlineShape. In this case you can get to the properties like so:

ActiveDocument.Shapes(1).TextFrame.TextRange.InlineShapes(1)

You do not need to select the picture to get its properties.

  • Related