Re: word controls on a page
- From: "Tony Jollans" <My forename at my surname dot com>
- Date: Wed, 19 Mar 2008 17:26:37 -0000
ActiveX controls belong either to the Shapes or InlineShapes Collections. You can walk these something like this (the MsgBox is just for demonstration):
For Each Sh In ActiveDocument.InlineShapes
If Sh.Type = wdInlineShapeOLEControlObject Then
Set OLE = Sh.OLEFormat
Set Obj = OLE.Object
MsgBox OLE.ClassType & vbTab & Obj.Name
End If
Next
--
Enjoy,
Tony
"Adrian Turner" <adeturner@xxxxxxxxxxxxxxxx> wrote in message news:653FD021-F2B3-431E-9E0E-708D14232921@xxxxxxxxxxxxxxxx
I have controls on the page, as opposed to within a form. How would you cycle
through the controls collection. If they were on a form it would be easy. You
can also reference them by the name directly, but is there not a collection ?
Thanks
Adrian
.
- Follow-Ups:
- Re: word controls on a page
- From: Jialiang Ge [MSFT]
- Re: word controls on a page
- Prev by Date: Programmed (VBA) mail merge not working in Office 2007
- Next by Date: VBA and switching focus between applications
- Previous by thread: Programmed (VBA) mail merge not working in Office 2007
- Next by thread: Re: word controls on a page
- Index(es):