In Word and PowerPoint, you can only assign a name to a shape using VBA (in contrast to Excel where you can do this in the formula bar).
Word does not force shapes to have unique names, so it is possible to have two shapes both named Text Box 2. You can refer to shapes also by their index position in the ActiveDocument.Shapes collection.
Once you identify what Shape you need to work with, then you can simply manipulate the .TextFrame.TextRange.Text property:
Sub Test()
Dim shp As Shape
Dim str As String
For Each shp In ActiveDocument.Shapes
str = "My name is " & shp.Name
str = str & vbNewLine & "My EditID is " & shp.EditID
shp.TextFrame.TextRange.Text = str
Next
End Sub
One other thing you might consider is adding an AlternativeText property to each shape. Of course this doesn't solve the "non-uniqueness" problem, but you can use this (or CustomerData/CustomXMLParts to assign some metadata to shapes, as a further means of identifying and differentiating them.