/build/static/layout/Breadcrumb_cap_w.png

Add a button in Excel or Word

I want to know if its possible to make an msi which creates a new macro button in Excel/Word
Im using wise 7.0 sp1 and have tried to capture it but so far no luck[:@]

Have anyone any idea of doing this?
I guess its only some regkeys i need to add

0 Comments   [ + ] Show comments

Answers (3)

Posted by: anonymous_9363 16 years ago
Red Belt
0
Macros are stored in document templates. You are *strongly* advised to use a template other than NORMAL.DOT to store your personal macros (and any other customisations, come to that), since that file is so crucial to Word's well-being. Excel doesn't have a similar "global" file.

IIRC, the buttons graphics are stored in binary files which, again IIRC, live in the Windows folder. I just can't recall the extension used for those files...The problem is that the one file (i.e. one for Word, one for XL) is used for all the toolbar buttons so, if your package overwrites an existing one, the user's other tollbars will be trashed. So, the best option is to control the button-building with script. The stuff here http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Q_20905530.html looks like it might provide a start.
Posted by: Bankeralle 16 years ago
Second Degree Blue Belt
0
Thx for the help VBSCab. I did not know that macros were stored in the documents templates.

I still have not figured it out how i can do this by buiding a script though.
I tried to autoIT making the script but this is no good idea since i have to use the mouse for making a button, can
can't use only keystrokes. So i guess this will be a problem if the users running different resolutions on their desktops.

So if anyone have done this please let me know how i shoul proceed
Posted by: anonymous_9363 16 years ago
Red Belt
0
ORIGINAL: Bankeralle
I still have not figured it out how i can do this by buiding a script though.
Forget AutoIt. As you seem to be feeling your way, I think your best option is to record the button-creation process in the two products as a macro (the code produced will be slightly different) - which will produce VBA (Visual Basic for Applications) code - and adapt it to VB Script. After recording, Alt+F11 takes you into the VBA Editor. Browse to the new module which will have been created, double-click the module name in the left-hand pane of the editor and you'll see the code.

Sounds daunting? It's really not: the essence is to simply remove any data-typing from the VBA code. For example, where a line goes 'Dim objOL As Object', you would remove the ' As Object'. It's not a 100% rule and you may need to tailor the code further but it's mostly pretty straightforward.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ