Pass Arguments to Function Through Ribbon
Hey all,
I'm wondering how to pass arguments to a function through a ribbon button.
I have an array of buttons in a self-created ribbon group. I have each button assigned to open a different document in a series. So the first button would obviously open the first document, the second button would open the second, etc. down the list.
The functions to open these docs are identical aside from the file names. So why have 18 functions and growing? Why not save space and programming time just maintaining one, to which I can pass an integer argument, and the same function can manage opening whatever document is requested based on what button is clicked? But how do I pass the function an argument through Word's ribbon?
I'm running Windows 8 with Microsoft Word 2010.
I've done searches on Google and taken books out from the library to learn this, and I've come up with nothing. This leads me to believe either I don't understand what I'm reading when the answer is in front of me (I'm not a book learner) or this kind of thing is impossible.
Thanks, everyone.
Last edited by inagalaxyfarfarawry; 03-14-2015 at 04:43 PM.
|