Reto,
Yes, just use the .Name property:
Sub TextBoxNamerDemo
Dim x As Shape, y As Shape
Set x= ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, _
100, 70, 30, 30)
Set y= ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, _
150, 70, 30, 30)
x.Name = "Xbox"
y.Name = "Ybox"
MsgBox "Document now has two textboxes."
ActiveDocument.Shapes("Xbox").Delete
MsgBox "First box now gone."
End Sub
------ WWW: http://www.speakeasy.org/~mtangard ----------------------
------------- "Life is nothing if you aren't obsessed." --John Waters
---------------------------------------------------------------------
Quote:
> Hi,
> is there a possibility to give each textbox in a word-document a name and
> reference it from VBA throug this specific name?
> If not: what other possibilities do i have to find the textbox which i want?
> thanks in advance,
> Reto