#1
|
|||
|
|||
Add a macro to a shape
Hello,
I have add a attachment so you can beter understand my question. I want to show userform1 when is press the big button. Can someone explain to me how to do this? Thanks |
#2
|
||||
|
||||
Change the graphic to an activeX button - see attached.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Thanks for your reaction.
It is working but..... I don't want to print the button Do you know how to fix this? |
#4
|
||||
|
||||
Put the button on a custom ribbon instead and there's no button to print.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
|||
|
|||
Yes i know how to do that but than i got the problem that i can't share the ribbon with other persons. Do you have an idea how to fix this?
Thanks for your response! |
#6
|
||||
|
||||
Of course you can. Add the ribbon to the document/template http://gregmaxey.mvps.org/word_tip_p...bbon_main.html
See attached
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com Last edited by gmayor; 07-06-2018 at 01:01 AM. |
#7
|
|||
|
|||
Thanks!
I will read it. Is this also working for word 2016 |
#8
|
||||
|
||||
I assume you mean the link - in which case yes. It works for all ribbon equipped versions of Office.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#9
|
|||
|
|||
Hi Graham,
Thanks for the link! It works perfect. Only problem is that i get a error by this code: myRibbon.InvalidateControl control.id Do you also have a code that i only see three buttons in the ribbon where i can link a macro to. See the attachment. Thanks a lot! |
#10
|
||||
|
||||
Did you see the attachment I posted originally, which demonstrates the code needed to operate a button. As you haven't attached your document, I cannot guess what your problem is.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#11
|
|||
|
|||
Ahhaa
Sorry didn't see that one. Last question (sorry.... Which code do i need to put in custom UI editor? Thanks men |
#12
|
||||
|
||||
To edit the ribbon, open the document in the Custom UI editor, Open another copy of the editor and open your own document (with neither document open in Word). Copy the XML code from my document to yours - add buttons as required.
Save and close the UI editor then open the documents in Word and copy the macros across and edit as appropriate.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#13
|
|||
|
|||
Yessss finaly!
It works perfect! Thanks a lot. How do you know al this? I really like to do this work. Do you have any tips for a online course to start? Thanks |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to change size / shape of a shape in a stencil | tomgoodell | Visio | 1 | 06-30-2016 04:40 AM |
Assign Macro to Shape in Word 2013 | tunes10590 | Word VBA | 8 | 01-29-2015 06:26 AM |
locking shape within shape | cpwljaw | Drawing and Graphics | 1 | 08-28-2012 12:13 AM |
find the name of a shape | Guy Roth | Visio | 0 | 05-23-2012 12:58 AM |
Run Macro & Activate shape | ibrahimaa | Excel Programming | 1 | 01-21-2012 02:14 AM |