I should also add that the only method I have found so far to link a QAT
button to a macro from my .ppam add-in is by:
1) first create a QAT button based on a macro from a currently open
macro-enabled presentation (.pptm)
2) manually edit the file "...[UserProfile]\Local Settings\Application
Data\Microsoft\OfficePowerPoint.qat" and replace ocurrences of
"[presentation].pptm" by "[addin].ppam".
If there is a more efficient and "user friendly" way to do this, I would
like to know.
This method is cumbersome.
> I created an Add-In for PPT2007 and saved it in the proper location as a
> ..ppam file.
[quoted text clipped - 10 lines]
> How do I make the macros in my .ppam add-in file visible and accessible
> globally in powerpoint such that I can link them to a QAT button?
I haven't tried this but it might be worth a shot ... when you customize the
QAT, you can tell PPT whether to make it a per-document customization or a
global one. Try customizing your macros from the PPTM to the QAT and make them
per-document. Then save as PPAM and see if the customizations hold when the
PPAM is loaded.
Otherwise, you'll need to add Ribbon XML code to your add-in to do the
customizations.
This is a good place to start:
http://msdn2.microsoft.com/en-us/library/aa338202.aspx
A critical bit is contained in a note. You WANT to download and use this:
http://openxmldeveloper.org/articles/CustomUIeditor.aspx
Otherwise, the rest of the MSDN article will make your hair leave your head in
large handfuls.
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
alainr - 09 Apr 2008 21:07 GMT
Interesting suggestion.
Unfotunately, it still doesn't alleviate my inconvenience. When the QAT for
the .pptm is customized, the path to the macro stored in the QAT references
the .pptm file. I still have to edit the QAT in the .pptm package to point
it to the .ppam before actually saving it to a .ppam.
However, I do like your suggestion as I think it is a good idea to have the
macro button for the QAT stored along with the Add-in. Then if I unload the
Add-In, the buttons are also removed.
Aside from the QAT configuration inconvenience, the problem remains that I
can't run my Add-In macros directly from PowerPoint (i.e. by launching from
the "View Macros" Ribbon button) without manually configuring the Ribbon
myself. This requires too many extra steps for the simple tasks that I need
to accomplish. Some of my macros are not used very often and I don't want to
generate a Ribbon button for every macro I write. But I do want my macros to
be available from any presentation I work on (hence the reason I created an
Add-In to contain them).
Shyam Pillai - 09 Apr 2008 22:48 GMT
You should created a ribbon and associate the macros to ribbon items. Just
mark the ones you don't need on the ribbon as visible = false. This way,
when you customize the QAT, the hidden macro items in the ribbon will be
available.
Regards,
Shyam Pillai
Image Importer Wizard
http://skp.mvps.org/iiw.htm
> Interesting suggestion.
>
[quoted text clipped - 25 lines]
> an
> Add-In to contain them).
alainr - 10 Apr 2008 14:18 GMT
With respect to customizing the Ribbon: it's not an issue of clutter that
concerns me; it's the labor involved everytime I write a new Macro and want
to make this macro available globally. The extra hurdles I have to jump over
and hoops I have to jump through defy the purpose of macros and
customization. Right now, it is easier to maintain a macro library in a
text file and pasted them as required in a code module of every individual
presentation in which I need them.
I thought I was missing something to achieve my goal, but I now realize that
PowerPoint 2007 does not have the functionality I seek to efficiently manage
and use a custom (and dynamic) macro library.
Steve Rindsberg - 10 Apr 2008 16:47 GMT
> With respect to customizing the Ribbon: it's not an issue of clutter that
> concerns me; it's the labor involved everytime I write a new Macro and want
[quoted text clipped - 7 lines]
> PowerPoint 2007 does not have the functionality I seek to efficiently manage
> and use a custom (and dynamic) macro library.
Another approach would be to keep your macros in a single presentation and open
that whenever you need to run them. They'd be available on the Run Macro dialog
box.
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================