mcwhirt3@msu.edu <mcwhirt3@msu.edu> was very recently heard to utter:
> In excel i use vba to control objects(wordart, boxes, lines...etc.)
> However in excel it is clear what each object's "name" is in that
[quoted text clipped - 5 lines]
> doesn't seem to work. How do i relate code to objects if i don't know
> what the name of the object is? Thanks for any help.
I haven't programmed against Excel or Word, so I'm not really sure what the
big differences are, but in Publisher you reference a shape as follows
<Document Object such as ActiveDocument>.Pages(pageid).Shapes(shapeid)
I tend to either create shapes at runtime so I can assign them to objects
and keep them in check that way, or I use the selection
Selection.ShapeRange(1) returns the first selected object (I tend to make
sure there is only one object selected to simplify things)
Selection.TextRange returns the selected text range if text within a text
box is selected.
If you haven't already done so, check out the VBA help files at c:\Program
Files\Microsoft Office\Office11\1033\VBAPB10.CHM (default location, will
vary with language and install folder)

Signature
Ed Bennett - MVP Microsoft Publisher