none
VBA XML Ribbon now rendering in Project Client 2013 (version: 15.0.4569.15.04) RRS feed

  • Question

  • What I’m trying to do is to add XML ribbon to Project Client 2013 using VBA code. I have a method in my VBA project (mpp file) under “ThisProject”. When this project is open, it passes the xml ribbon to ActiveProject.SetCustomUI (“My XML ribbon content HERE”). I can break point and see the call is being made but ribbon is not visible on the Project Client 2013.

    This ribbon works in only one computer (in Project Client 2013). Right now I have this file stored as a local MPP file, but eventually I have to move this code to Project Server (global-check-out location). There are no error or any issues that I can think.

    Why does this work in one computer but not in other three computers? Is My XML schema and the format correct for Project Client 2013? What kind of permissions does Ribbon requires and how can I check them?

    Below is my VBA/XML ribbon code:

    Private Sub Project_Open(ByVal pj As Project)
        Call AddCustomUI
    End Sub
    
    Sub AddCustomUI()
        Debug.Assert 1 < 0
    
        Dim customUiXml As String
     
        customUiXml = "<mso:cmd app=""MSProject"" dt=""1"" /><mso:customUI xmlns:x1=""http://schemas.microsoft.com/office/2009/07/customui/macro"" xmlns:mso=""http://schemas.microsoft.com/office/2009/07/customui""><mso:ribbon><mso:qat/><mso:tabs><mso:tab id=""PMMTab"" label=""PMM"" insertBeforeQ=""mso:TabAddIns""><mso:group id=""grpPMM1"" label=""PMM Options"" autoScale=""true"">" _
            & "<mso:button idQ=""x1:btnSetOptions"" label=""Set Options"" imageMso=""TableBorderPenColorPicker"" onAction=""btn_ShowSetOptionsForm"" visible=""true""/><mso:button idQ=""x1:btnSetBaseline"" label=""Set Baseline"" imageMso=""VisibilityHidden"" onAction=""btn_ShowSetBaselineForm"" visible=""true""/>" _
            & "<mso:button idQ=""x1:btnSummaries"" label=""Summaries"" imageMso=""DesignXml"" onAction=""btn_InsertATECSummaryTasks"" visible=""true""/><mso:button idQ=""x1:btnExcelRpt"" label=""Excel Report"" imageMso=""AppointmentColor9"" onAction=""btn_ShowExcelReportForm"" visible=""true""/><mso:button idQ=""x1:btnDtLogic"" label=""Date Logic"" imageMso=""AppointmentColor5"" onAction=""btn_ShowDateLogicForm"" visible=""true""/>" _
            & "<mso:button idQ=""x1:btnTskSchedule"" label=""Task Schedule"" imageMso=""Bullets"" onAction=""btn_TaskSchedule"" visible=""true""/><mso:button idQ=""x1:btnClean"" label=""Clean"" imageMso=""InkEraseMode"" onAction=""btn_ShowCleanProjectForm"" visible=""true""/><mso:button idQ=""x1:btnQAS"" label=""QAS"" imageMso=""PositionAbsoluteMarks"" onAction=""btn_LaunchQAS"" visible=""true""/>" _
            & "<mso:button idQ=""x1:btnPMMSite"" label=""PMM Site"" imageMso=""MsnLogo"" onAction=""btn_GoToPMESDocs"" visible=""true""/><mso:button idQ=""x1:btnActOffsets"" label=""Actual Offsets"" imageMso=""LinkBarCustom"" onAction=""btn_calculateActualOffsets"" visible=""true""/><mso:button idQ=""x1:btnATCForm"" label=""ATC Form"" imageMso=""ViewSlideSorterView"" onAction=""btn_GoToATCForm"" visible=""true""/>" _
            & "</mso:group><mso:group id=""grpPMM2"" label=""OTC Options"" autoScale=""true""><mso:button idQ=""x1:btnSetResDefault"" label=""Set Resource Defaults"" imageMso=""ListMacros"" onAction=""btn_SetResourceDefaults"" visible=""true""/></mso:group><mso:group id=""grpPMM3"" label=""External Links"" autoScale=""true""><mso:button idQ=""x1:btnLinkOptions"" label=""Link Options"" imageMso=""ListMacros"" onAction=""btn_LinkOptions"" visible=""true""/>" _
            & "<mso:button idQ=""x1:btnTRPOutline"" label=""TRP Outline"" imageMso=""CondolatoryEvent"" onAction=""btn_TRPOutline"" visible=""true""/><mso:button idQ=""x1:btnSynProject"" label=""Sync Project"" imageMso=""RecordsRefreshMenu"" onAction=""btn_SyncProject"" visible=""true""/><mso:button idQ=""x1:btnDetails"" label=""Details"" imageMso=""SlidesPerPageSlideOutline"" onAction=""btn_Detail"" visible=""true""/>" _
            & "<mso:button idQ=""x1:btnATCTools"" label=""ATEC Tools"" imageMso=""HyperlinksVerify"" onAction=""btn_ATECTools"" visible=""true""/><mso:button idQ=""x1:btnImportActuals"" label=""Import Actuals"" imageMso=""_3DPerspectiveDecrease"" onAction=""btn_ImportActuals"" visible=""true""/><mso:button idQ=""x1:btnAECMenu"" label=""AEC Menu"" imageMso=""ViewFullScreenView"" onAction=""btn_AEC_Menu"" visible=""true""/></mso:group>" _
            & "<mso:group id=""grpPMM4"" label=""Admin Options"" autoScale=""true""><mso:button idQ=""x1:btnChgLog"" label=""Change Log"" imageMso=""ListMacros"" onAction=""btn_ShowChangeLogForm"" visible=""true""/><mso:button idQ=""x1:btnResMaint"" label=""Resource Maint"" imageMso=""CondolatoryEvent"" onAction=""btn_ShowResMaintForm"" visible=""true""/>" _
            & "<mso:button idQ=""x1:btnChkResRate"" label=""Check Resource Rates"" imageMso=""TableDesign"" onAction=""btn_checkResourceRates"" visible=""true""/><mso:button idQ=""x1:btnResReport"" label=""Resource Report"" imageMso=""SlideShowUseRehearsedTimings"" onAction=""btn_ShowSetResourceRatesForm"" visible=""true""/></mso:group></mso:tab></mso:tabs></mso:ribbon></mso:customUI>"
        
         
        ActiveProject.SetCustomUI (customUiXml)
    End Sub
    

    Thank you so much for your help,

    Thursday, January 15, 2015 4:48 PM

All replies