Reputation: 1987
I have "Microsoft 365 Apps for enterprise". I have developed a VBA Word macro and a VBA PowerPoint macro.
I want a similar user interface for each macro: ideally, a Quick Access Toolbar button.
For Word, this is easy:
.dotm
), use the Word UI (File > Options > Quick Access Toolbar) to add a button for the macro, for just the .dotm
file..dotm
file to the %APPDATA%\Microsoft\Word\STARTUP
directory.The button appears in the Word Quick Access Toolbar for all documents, and works. Job done.
For PowerPoint, not so easy, hence this question. The equivalent steps for PowerPoint don't work:
.potm
), use the PowerPoint UI (File > Options > Quick Access Toolbar) to add a button for the macro, for just the .potm
file..potm
file as a .ppam
(PowerPoint add-in)..ppam
to the %APPDATA%\Microsoft\AddIns
directory.ppam
> Open)The Quick Access Toolbar button appears, but clicking it results in the error message:
The macro cannot be found or has been disabled because of your security settings
Upvotes: 2
Views: 1320
Reputation: 1987
Diagnosis:
The macro cannot be found because the Quick Access Toolbar action in the .ppam
refers to the .potm
file name, not the .ppam
.
Solution:
.ppam
fileuserCustomization\customUI.xml
file in a text (or XML) editoronAction
attribute value (that runs the macro) from .potm
to .ppam
.ppam
.ppam
over the old file in %APPDATA%\Microsoft\AddIns
.ppam
> Open)The Quick Access Toolbar button should now run the macro.
Upvotes: 2