Word - Visuall Studio Hello World does not work

J

JerryK

Hi,

I am trying to get the Hello World example that Microsoft published to work.
I have added a command button to my word document and hooked the button up
in my C# code. However when I launch my application in Visual Studio and
try the click the button on the Word document it acts as thought I am trying
to edit the document. The button is selected when I click on it. If I
double click on the button the Word macro editor appears and my C# function
associated with the button Click event is not fired. What am I doing
wrong?

Thanks,

Jerry
 
C

Chad DeMeyer

Jerry,

You just need to exit design mode. If you don't already have the Control
Toolbox toolbar displayed, right click in the toolbars area and click on
Control Toolbox to display the toolbar. The leftmost button should be
highlighted and if you float your cursor over it display the tooltip, "Exit
Design Mode". Click the button, it then becomes un-highlighted and now you
should be able to initiate events by clicking on the button in your
document.

Regards,
Chad
 

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