Runtime Click event for a Inline Shape button on Word

N

naveen

Hi,
I am adding click event for dynamically generated inline shape command
buttons in following way to the module
ActiveDocument.VBProject.VBComponents(1).CodeModule.AddFromString
strGenerateQtypeEvent

where strGenerateQtypeEvent is a string having click event generated code

This gives application error /crash, When I trying to Protect document after
the execution of code.

Can anybody suggest me a general way to call event for the runtime generated
buttons.
Or plese suggest me how to proceed with causing of error

Thanks
 
G

Gene

You should use the button on the Control Toolbox Toolbar. When you add a
button from her you can select it and click the View Code option on the same
toolbar to set your click events.

-Gene
 

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