Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Microsoft Word _ Can't Get Command Button To Work

Posted by: pmcpowell Oct 27 2019, 10:31 AM

Hi, I'm revisiting an old automated document which updates a large number of fields within a .docm document based upon a spec sheet which has data bookmarked. As this is now going to be used by non-macro literate users I placed a Command Button on the spec sheet which I wanted to run the already tested macro. For the life of me I can't get this to activate on clicking. It just puts a box around it like it is in editing mode. Tried Ctrl Click etc but the macro wont run. In the CommandButtton (Click) code window I tried pasting in the code from the macro and also calling the Macro but it just doesn't activate. I put a pause on the first line to see if it lit up yellow but the code is not activated when I click.
I'm sure that this is going to be something simple but I've already spent an hour on this so please help if you can.

Many thanks,
Peter

Posted by: DanielPineault Oct 27 2019, 11:04 AM

Did you click, deactivate, the Design Mode?
Macros are enabled (you've checked you Marco Security)? It is in a Trusted Location?
Any chance you can post a copy of the document (removing anything remotely confidential first)?

Posted by: pmcpowell Oct 27 2019, 02:28 PM

Thanks Daniel - My bad, I didn't realize that Design Mode had to be deactivate. It's been a while since I automated anything :-)

One other thing though - I don't see the option to attach a macro to a Ctrl + key. It used to be in the Macro window where you would go to edit or run a macro. Is it still possible to attach a macro to a Crtl+ key?

Peter