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

Re: Runtime Click event for a Inline Shape button on Word by Gene

Gene
Mon Aug 30 10:54:38 CDT 2004

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

"naveen" <naveen@discussions.microsoft.com> wrote in message
news:F6217DD9-8FCA-42C7-9D23-91558433B809@microsoft.com...
> 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