word controls on a page

A

Adrian Turner

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
 
T

Tony Jollans

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
 
J

Jialiang Ge [MSFT]

Hello Adrain,

I am not sure if I understand your question correctly. If you meant ActiveX
controls (in Control ToolBox toolbar) by "controls on the page", I will go
along with Tony's suggestion. If you meant form fields (in Forms toolbar),
we need to cycle though the ActiveDocument.FormFields collection.
http://msdn2.microsoft.com/en-us/library/microsoft.office.tools.word.documen
t.formfields(VS.80).aspx

If you have any other concern, or questions, please feel free to let us
know.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello Adrian,

I am writing to check the status of the issue. Would you mind letting me
know the result of the suggestions? If you need further assistance, feel
free to let me know. I will be more than happy to be of assistance.

Have a great day!

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top