It's good to know, I have a choice to delete it or not.
I've added this script below, a line after, .End if
HTML Code:
Selection.ShapeRange(1).Delete
HTML Code:
Sub Gettext()
'Helped by Guessed (Andrew Lockton), from the MS office Word forum on 2021-11-14
Dim aShp As Shape, aRng As range
If Selection.ShapeRange.Count > 0 Then
Set aShp = Selection.ShapeRange(1)
Debug.Print aShp.TextFrame.TextRange.Text
Set aRng = aShp.Anchor
aRng.Collapse Direction:=wdCollapseStart
aRng.FormattedText = aShp.TextFrame.TextRange.FormattedText
End If
Selection.ShapeRange(1).Delete
End Sub
Thank you so much.
I have to open a new thread for something else, I can't figure out. Remove the default marging in a textbox.
Cendrinne