JBSMichael
12-10-2018, 09:12 AM
I have a macro in MS Project 2010 that I would like to run from a button in the ribbon. So far, so easy: just add a custom group and a custom button in the ribbon customiser. However, I want to add some code that will a) add a similar button when other users open the file; and b) remove that customisation first (if it already exists) before then adding the button back. This question is about the second part - clearing customisation (or at least this specific button - the button is called "Export Reporting Data" and is in the custom group "Reporting").
From Microsoft I got the following, which purports to clear all customised elements:
Sub RemoveCustomUI()
Dim customUiXml As String
customUiXml = "<mso:customUIxmlns:mso=""http://schemas.microsoft.com/office/2009/07/customui"">" _
& "<mso:ribbon></mso:ribbon></mso:customUI>"
ActiveProject.SetCustomUI (customUiXml)
End Sub
However, this doesn't work for me in Project 2010. Can anyone help please? Thank you...
MJ
From Microsoft I got the following, which purports to clear all customised elements:
Sub RemoveCustomUI()
Dim customUiXml As String
customUiXml = "<mso:customUIxmlns:mso=""http://schemas.microsoft.com/office/2009/07/customui"">" _
& "<mso:ribbon></mso:ribbon></mso:customUI>"
ActiveProject.SetCustomUI (customUiXml)
End Sub
However, this doesn't work for me in Project 2010. Can anyone help please? Thank you...
MJ