To give the context of my problem, I have to work with documents with text boxes, these text boxes hide the whole sentence almost all the time, so I have to resize the text box by hand so that the text is visible. The problem is that on some documents there are over 700 text boxes. Then later I've found that i can do this (Resize shape to fit text in EN) :
So I was wondering if there is a way to select all the text boxes and resize them automatically selecting this option with VBA. Thank you !
EDIT
So I've tried to start my code doing this :
Dim eShape As Word.shape
Dim i As Long
For i = ActiveDocument.Shapes.Count To 1 Step -1
Set eShape = ActiveDocument.Shapes(i)
Then I start the condition by checking the object type in this case TextBox with
If eShape.Type = msoTextBox Then
But for the rest I didn't found the method to resize the element.
TextFrame
andAutoSize
– Timothy Rylatt