How do I create a Powerpoint Ribbon macro menu item without including the file (Presentation) name reference (like I can do in Excel).
When I add a VBA macro to the Powerpoint ribbon as a menu item it includes the current presentation name with the macro name. If I save the presentation as a different name this presentation name is not updated and the menu-macro fails with message "This macro cannot be found or has been disabled because of your security settings".
Original menu-macro reference: "Eng_Viet!BackUp" where "Eng_Viet" is the pptm Presentation name and "BackUp" is the VBA subroutine (macro)
If I save the presentation as a new file eg. "Eng_Viet_Backup.pptm" then new name presentation tries to execute the original menu reference "Eng_Viet!BackUp and of course it fails.
In Excel the File name is not added to to the Menu-macro name.
Related
I have a macro that I have coded in a VBA module, saved in a .dot file. However, when I go to Customize Ribbon in Word and try to add it, it does not show up. I have tried saving it in the Word STARTUP folder as well as the Custom Office Templates folder.
I would like to have the macro set up so that it loads in all Word Documents as a clickable button on the Word toolbar/ribbon.
I can tell you for dotm files. I think it should work the same for dot. However, you might as well switch to dotm since you have Word 2013.
Exit Word.
Put the dotm in %appdata%\Microsoft\Word\Startup. You mentioned you have already done this, which is good!
Restart Word.
Check File | Options | Add-Ins and make sure your dotm is listed under "Active Application Add-ins".
If not, hit "Go" at the bottom to manage "COM Add-ins," and hit the checkmark by your dotm's name.
Right-click the ribbon and select "Customize Ribbon."
In the "Customize Ribbon" dialog, under "Choose commands from," select the "Macros" category.
All your macros should be listed there, by project name. You may have to hunt through the list as they will all start with Project. by default. You can change your project's name in the VBA editor, Properties pane, to make it easier to find.
Choose the destination and hit Add>>.
Tested in Word 2013, Windows 8, with numerous dotm files.
I have a workbook that uses a user form full of buttons to organize and return data and execute functions. I would like to upgrade this form to a Ribbon tab with all of these functions that is only there for this specific workbook.
I have worked with the customUI.xml approach before while making an add in but can't do the same change to the excel fileand make it work.
Here is what I tried:
rename the excel file to a zip file
add a folder customUI to the .xlsm.zip file
add customUI.xml to that folder
When I open the file I don't see my ribbon.
Unfortunately I have to do it the manual way because my work has very strict software guidelines and the Ron de Bruin application got denied. But I did it manually for the add in I created and that is working fine.
Does anyone know of the differences between an add in tab and a tab in a workbook?
Figured it out, as #Raystafarian and #Nathan_Sav pointed out I was missing the line <Relationship Target="customUI/customUI.xml" Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Id="rid4"/> from the rels/.rels file inside the excel sheet. Adding that showed the ribbon tab and all my code linked as expected.
Within Powerpoint 2010 I have customised a tab on ribbon with both standard and custom macro buttons using 'customize the ribbon'.
In an attempt to share this ribbon with friends I have exported the ribbon as an .exportedUI file and saved the presentation as a macro enabled template.
When I open up any file called (Presentation1) the buttons work fine as the name for the macros are 'Presentation1'!macro#. If I then save as or open another blank (Presentation 2) the buttons produce the error:
"The macro could not be found or has been disabled because of your security settings"
The problem appears to be with the name of the macro that is associated with the button.
Is it possible to mix custom with standard buttons on an exportable ribbon? Or will I have to create an add-in that produces a new tab then replicate the standard buttons required? I know it is possible to do this in Excel and in Word but in Powerpoint it appears not to be?
I have a macro in Powerpoint 2010 to open a new document based on a template based in a central location, to be installed on several machines.
Sub PowerpointTemplate()
Application.Presentations.Open ("file")
End Sub
Powerpoint does not save the macro. Even when setting "Macro in:" to "All open presentations", it seems to reset this selection to "Presentation 1". The macro works for the time that I have this current document open, but once I close Powerpoint and reopen it, the macro has been removed.
Is there anyway to set the macro to permanently apply to all presentations?
You need to create an Add-in and load it in order to make the code available to all open presentations.
Setting Macro In to All Open Presentations simply SHOWS you the available public macros in all open presentations; it has no effect on where the macro code is saved.
Stated simply my question is as follows Is it possible for a button on a worksheet in a normal excel workbook (.xlsx not .xlsm) to trigger a macro in another file specifically an installed excel add in (.xlam).
Here is some background on why I want to achieve this. I have a workbook that many users need to be able to view but only some need to be able to update by filling in a form on another sheet and calling a macro in an add in. The worksheet should not contain any macros to avoid security warnings when opened by normal users. I can do this by having a ribbon button in the add in that the user clicks which will then check that the correct workbook is open and that the form is filled in etc. before executing the update code. However the interface would be nicer if the button instead of appearing on the ribbon was on the worksheet just below the form. Therefore my question is it possible to trigger an external macro from a button click in a non macro enabled workbook.
Yes, you can assign an external macro (which should be .xlsm file) to a non-macro-enabled workbook (.xlsx) button. My xlsm macro resides in the same directory as the xlsx workbook for simplicity. (Note: I am using Excel 2010)
Firstly, you must open your xlsm macro in the same instance of Excel window (i.e. do not open a new instance of Excel) so that your xlsx workbook will be able to see/access it.
Right-click on your xlsx workbook button and select "Assign Macro..."
Make sure you select Macros in: All Open Workbooks
All macros in open workbooks will be shown (this is why it is important to do step 1).
Select the desired macro from the list then click OK.
I don't see how you can execute a macro from a control in a non-macro-enabled workbook.