Yup! thats my thread.
Can you possibly provide an example of how CustomUI can be incorporated to my code?
Sub Auto_Open()
Dim oToolbar As CommandBar
Dim oButton As CommandBarButton
Dim MyToolbar As String
' Give the toolbar a name
MyToolbar = "Analyst Toolkit"
On Error Resume Next
' so that it doesn't stop on the next line if the toolbar's already there
' Create the toolbar; PowerPoint will error if it already exists
Set oToolbar = CommandBars.Add(Name:=MyToolbar, _
Position:=msoBarFloating, Temporary:=True)
If Err.Number <> 0 Then
' The toolbar's already there, so we have nothing to do
Exit Sub
End If
'oToolbar.Width = 100
On Error GoTo ErrorHandler
'Button 1
Set oButton = oToolbar.Controls.Add(Type:=msoControlButton)
With oButton
.DescriptionText = "Copy Size & Position"
.Caption = "&Copy Size/Position"
.OnAction = "CopyPositionSize"
'Runs the Sub CopyPositionSize() code when clicked
.Style = msoButtonIconAndWrapCaption
.FaceId = 3985
End With
'Button 2
Set oButton = oToolbar.Controls.Add(Type:=msoControlButton)
With oButton
.DescriptionText = "Paste Size & Position"
.Caption = "&Paste Size/Position"
.OnAction = "PastePositionSize"
'Runs the Sub CopyPositionSize() code when clicked
.Style = msoButtonIconAndWrapCaption
.FaceId = 4157
End With
'Button 3
Set oButton = oToolbar.Controls.Add(Type:=msoControlButton)
With oButton
.BeginGroup = True
.DescriptionText = "Save Copy with No Links"
.Caption = "Export and &Break Links"
.OnAction = "BreakAllLinks"
'Runs the Sub CopyPositionSize() code when clicked
.Style = msoButtonIconAndWrapCaption
.FaceId = 2647
End With
'Button 4
Set oButton = oToolbar.Controls.Add(Type:=msoControlButton)
With oButton
.DescriptionText = "Save Copy with No Links"
'Tooltip text when mouse if placed over button
.Caption = "Export, Break Links and &Email"
'Text if Text in Icon is chosen
.OnAction = "BreakAllLinksAndEmail" 'Runs the Sub CopyPositionSize() code when clicked
.Style = msoButtonIconAndWrapCaption
.FaceId = 2986
End With
oToolbar.Visible = True
NormalExit:
Exit Sub ' so it doesn't go on to run the errorhandler code
ErrorHandler:
'Just in case there is an error
MsgBox Err.Number & vbCrLf & Err.Description
Resume NormalExit:
End Sub