0

I would like to use a getLabel callback from some custom XML in a PowerPoint ppam in order to localise text in the Ribbon. My concern is that doing this could cause error messages to appear from time to time when starting PowerPoint ("PowerPoint can't start this feature because you currently have a Visual Basic for Applications project in break mode.") as users have experienced with an add-in that uses a getEnabled callback. I have already asked a question about other options for localising the ribbon.

Do you use getLabel in a PowerPoint ppam add-in? If so, do you sometimes see this error message when PowerPoint is started? Additionally, do you use getEnabled, and does this ever cause this error message to be displayed when PowerPoint starts up?

Answers either way would be great.

This is what I am testing:

Custom UI XML fragment:

       <button id="app1ShowAMsg"
          imageMso="TableInsert"
          size="normal"
          onAction="app1ShowAMessage"
          label="app1GetLabel"/>

VBA code:

Public Sub app1GetLabel(control As IRibbonControl, ByRef returnedVal)
  Select Case control.Id
    Case "app1ShowAMsg"
      returnedVal = "My added label"
  End Select
End Sub

Public Sub app1ShowAMessage()
  MsgBox "You clicked a button."
End Sub
neilt17
  • 345
  • 4
  • 13

1 Answers1

1

Yes, it is. I don't see anything strange in using the getLabel callback along with others. Moreover, that is the recommended way of implementing any dynamism on the Fluent UI - for changing the caption string and etc. at runtime. The Fluent UI is described in depth in the following series of articles:

Also you may find the following articles helpful:

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45