How do I insert a custom control (OCX) into MS Word?

B

bev thomas

Hi

Ive created a custom control using Visual Basic and would like to
incorporate it into one of my Microsoft Word 2002 forms.

In Word, if I try to open it through the Insert.. Object... file menu,
it does not show up in the object type list. If I try to insert it
through the "create from file" tab, I get a box with the name of my
OCX on it.

I can insert the control with no problems into Access 2002 and it
works exactly as it should.

If anyone can help me figure out what Im missing or doing wrong, it
would greatly be appreciated.

Thanks in advance.
 
C

Cindy M -WordMVP-

Hi Bev,
Ive created a custom control using Visual Basic and would like to
incorporate it into one of my Microsoft Word 2002 forms.

In Word, if I try to open it through the Insert.. Object... file menu,
it does not show up in the object type list. If I try to insert it
through the "create from file" tab, I get a box with the name of my
OCX on it.
This menu only contains things that are registered in the Windows system
as being available for OLE embedding. Your control may not meet these
requirements.

For what you describe, I'd expect to insert the control via the Control
Toolbox toolbar. There's a button on it that should let you add your
control to the Toolbox, and from there to insert it into the document.
I can insert the control with no problems into Access 2002 and it
works exactly as it should.
Please note that a Word document is not an Access form. Nor an Office
UserForm, for that matter. The Word environment puts different
constraints on an ActiveX control, so something may not always work
exactly as you expect.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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