M
Martin Stender
Hi all
I may have gotten all this upside down, but I'm messing around with
disabling some of the built-in commandbars in PowerPoint and replacing
them with more limited ones (to prevent users from using wrong fonts
etc.)
So I go like this '(the fontlist will change
:
Public Function addFontList()
'prior to this, I have removed the original fontlist
Set myControl = CommandBars("Formatting").Controls _
.Add(Type:=msoControlComboBox, Before:=1)
With myControl
.AddItem Text:="Verdana", Index:=1
.AddItem Text:="Arial", Index:=2
.DropDownLines = 5
.ListHeaderCount = 0
.ListIndex = 1
.Width = 120
.onAction = "setFont"
End With
End Function
Public Function setFont()
MsgBox "hey now!"
End Function
But the function 'setFont' never fires ... so I'm doing something wrong
.... again!
Thanks in advance for any response,
Martin
I may have gotten all this upside down, but I'm messing around with
disabling some of the built-in commandbars in PowerPoint and replacing
them with more limited ones (to prevent users from using wrong fonts
etc.)
So I go like this '(the fontlist will change
Public Function addFontList()
'prior to this, I have removed the original fontlist
Set myControl = CommandBars("Formatting").Controls _
.Add(Type:=msoControlComboBox, Before:=1)
With myControl
.AddItem Text:="Verdana", Index:=1
.AddItem Text:="Arial", Index:=2
.DropDownLines = 5
.ListHeaderCount = 0
.ListIndex = 1
.Width = 120
.onAction = "setFont"
End With
End Function
Public Function setFont()
MsgBox "hey now!"
End Function
But the function 'setFont' never fires ... so I'm doing something wrong
.... again!
Thanks in advance for any response,
Martin