Custom toolbar w/macros not showing in the PPT when I share it withothers

K

Kim

I have created a ppt with macros. I also created a custom toolbar with
the macros saved as buttons on it. When I save the ppt and give to
another coworker, the coworker can see the macros in the Tools, Macros
dialog, but the custom toolbar is no where to be found (it's not even
shown in the Customize toolbars area).

I've saved the original ppt with the macros and toolbar as a ppa and
have saved to the appropriate folder. I've tried sending the ppa file
to another coworker, and again they can see the macros but not the
toolbar.

Does anyone know why my toolbar disappears? We have a company custom
toolbar in ppt, and I've contacted the creator of this add in, and he
can't figure out why my toolbar disappears. We're all at a loss.

Any suggestions??
 
K

Kim

You probably need to post the code you use to creatre the toolbar.
--
john ATSIGN PPTAlchemy.co.uk

Free PPT Hints, Tips and Tutorialshttp://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
PPTLive Atlanta Oct 11-14 2009








- Show quoted text -

I didn't create the toolbar using code, I just created a new toolbar
using custom. So I think you're saying I need to create a custom
toolbar by creating the code and save it with my other macros. Would
you happen to have the code (or know where I can find it) to create
the toolbar on opening PPT? I can copy code from Word to do this, but
I know things are different in PowerPoint.
 
K

Kim

I didn't create the toolbar using code, I just created a new toolbar
using custom. So I think you're saying I need to create a custom
toolbar by creating the code and save it with my other macros. Would
you happen to have the code (or know where I can find it) to create
the toolbar on opening PPT? I can copy code from Word to do this, but
I know things are different in PowerPoint.- Hide quoted text -

- Show quoted text -

Ok, I got a little closer. I was able to use the code below from Word
which I use to create a new menu item.

Option Explicit

AddToolbar

End Sub

Sub AddToolbar()

Dim cbmCommandBarMenu As CommandBar
Dim cbmPPTMacros As CommandBarPopup
Dim cbmCommandBarMenuCascade As CommandBarPopup

' Clear the way for new menu
On Error Resume Next
Application.CommandBars("Menu Bar").Controls("PPT Macros").Delete

' Identify built-in menu bar to work with
Set cbmCommandBarMenu = Application.CommandBars("Menu Bar")

' Add the new menu bar item: PPT Macros
With cbmCommandBarMenu.Controls
' By not specifying "Before", new menu will appear after Help menu
'Set cbmPPTMacros = .Add(Type:=msoControlPopup, Before:=10)
Set cbmPPTMacros = .Add(Type:=msoControlPopup)
' Set caption for new menu.
With cbmPPTMacros
.Caption = "PPT Macros"
' Add single menu item and set properties
With .Controls.Add(msoControlButton)
.OnAction = "OpenMSWordObject"
.Caption = "&A Open MSWord Object"
End With

' Add single menu item and set properties
With .Controls.Add(msoControlButton)
.OnAction = "PlacemarkPosition"
.Caption = "&B First Placemark Position (H=.75, V=1.54)"
End With

' Add single menu item and set properties

With .Controls.Add(msoControlButton)
.OnAction = "Footnote"
.Caption = "&C Footnote = Select Footnote text box
first"
End With
End With



' Add submenu: Header/Footer Macros
Set cbmCommandBarMenuCascade = cbmPPTMacros.Controls.Add
(msoControlPopup)
With cbmCommandBarMenuCascade
.Caption = "&D Symbols"
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&A Division"
.OnAction = "Division"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&B Minus"
.OnAction = "Minus"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&C Multiplication"
.OnAction = "Multiplication"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&D Greater Than"
.OnAction = "GreaterThan"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&E Less Than"
.OnAction = "LessThan"
End With

' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&F 1/2"
.OnAction = "OneHalf"
End With

' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&G 1/4"
.OnAction = "OneQuarter"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&H 3/4"
.OnAction = "ThreeQuarter"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&I 1/3"
.OnAction = "OneThird"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&J 2/3"
.OnAction = "TwoThirds"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&K 1/8"
.OnAction = "OneEighth"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&L 3/8"
.OnAction = "ThreeEighth"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&M 5/8"
.OnAction = "FiveEight"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&N 7/8"
.OnAction = "SevenEighth"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&O Registered"
.OnAction = "Registered"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&P Trademark"
.OnAction = "Trademark"
End With

End With

End With

End Sub


The macro above will add the new menu, but in order for the new menu
to show up I first need to open the .ppt where I have all the macros
stored, and run the Add Toolbar macro. This seems to open the toolbar,
and keeps it there. I wish I didn't have to go through all the steps
to get it to show, but I'm just happy that it's working. If you have
any suggestions about my code please let me know. Thanks again for
steering me in the right direction!
 
B

Bill Dilworth

The manual tool bar customization is a Program level function. It stays
with the program. If you open a PowerPoint without your macros, the
customizations still remain on your system.

However, the Macro's themselves can be Presentation level (travel with the
presentation) or Add-ins to the Program level (stay with computer).

It sounds like you should make the toolbars into a Program level Auto_Open.
This will flag all sorts of alarms on a recieving computer about security,
but ... if they want the bling, they gotta click the OK button(s). You will
also want to evaluate if the tool bar you are creating exists, before you
create another copy of it.

Bill Dilworth


I didn't create the toolbar using code, I just created a new toolbar
using custom. So I think you're saying I need to create a custom
toolbar by creating the code and save it with my other macros. Would
you happen to have the code (or know where I can find it) to create
the toolbar on opening PPT? I can copy code from Word to do this, but
I know things are different in PowerPoint.- Hide quoted text -

- Show quoted text -

Ok, I got a little closer. I was able to use the code below from Word
which I use to create a new menu item.

Option Explicit

AddToolbar

End Sub

Sub AddToolbar()

Dim cbmCommandBarMenu As CommandBar
Dim cbmPPTMacros As CommandBarPopup
Dim cbmCommandBarMenuCascade As CommandBarPopup

' Clear the way for new menu
On Error Resume Next
Application.CommandBars("Menu Bar").Controls("PPT Macros").Delete

' Identify built-in menu bar to work with
Set cbmCommandBarMenu = Application.CommandBars("Menu Bar")

' Add the new menu bar item: PPT Macros
With cbmCommandBarMenu.Controls
' By not specifying "Before", new menu will appear after Help menu
'Set cbmPPTMacros = .Add(Type:=msoControlPopup, Before:=10)
Set cbmPPTMacros = .Add(Type:=msoControlPopup)
' Set caption for new menu.
With cbmPPTMacros
.Caption = "PPT Macros"
' Add single menu item and set properties
With .Controls.Add(msoControlButton)
.OnAction = "OpenMSWordObject"
.Caption = "&A Open MSWord Object"
End With

' Add single menu item and set properties
With .Controls.Add(msoControlButton)
.OnAction = "PlacemarkPosition"
.Caption = "&B First Placemark Position (H=.75, V=1.54)"
End With

' Add single menu item and set properties

With .Controls.Add(msoControlButton)
.OnAction = "Footnote"
.Caption = "&C Footnote = Select Footnote text box
first"
End With
End With



' Add submenu: Header/Footer Macros
Set cbmCommandBarMenuCascade = cbmPPTMacros.Controls.Add
(msoControlPopup)
With cbmCommandBarMenuCascade
.Caption = "&D Symbols"
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&A Division"
.OnAction = "Division"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&B Minus"
.OnAction = "Minus"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&C Multiplication"
.OnAction = "Multiplication"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&D Greater Than"
.OnAction = "GreaterThan"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&E Less Than"
.OnAction = "LessThan"
End With

' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&F 1/2"
.OnAction = "OneHalf"
End With

' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&G 1/4"
.OnAction = "OneQuarter"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&H 3/4"
.OnAction = "ThreeQuarter"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&I 1/3"
.OnAction = "OneThird"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&J 2/3"
.OnAction = "TwoThirds"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&K 1/8"
.OnAction = "OneEighth"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&L 3/8"
.OnAction = "ThreeEighth"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&M 5/8"
.OnAction = "FiveEight"
End With ' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&N 7/8"
.OnAction = "SevenEighth"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&O Registered"
.OnAction = "Registered"
End With
' Add cascading menu item and set properties
With .Controls.Add(msoControlButton)
.Caption = "&P Trademark"
.OnAction = "Trademark"
End With

End With

End With

End Sub


The macro above will add the new menu, but in order for the new menu
to show up I first need to open the .ppt where I have all the macros
stored, and run the Add Toolbar macro. This seems to open the toolbar,
and keeps it there. I wish I didn't have to go through all the steps
to get it to show, but I'm just happy that it's working. If you have
any suggestions about my code please let me know. Thanks again for
steering me in the right direction!
 
K

Kim

The code to make the toolbar needs to be in a sub called Auto_Open

Then save as a .ppa file and install on all the PCs (Tools > AddIns > New)

Have a look athttp://www.pptfaq.comin the programming section
--
john ATSIGN PPTAlchemy.co.uk

Free PPT Hints, Tips and Tutorialshttp://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
PPTLive Atlanta Oct 11-14 2009








- Show quoted text -

It's a beautiful thing! Thanks for the help! I moved my Add Toolbar
macro into a new sub called Sub Auto_Open. Now it works PERFECTLY for
me and for other users. I can't thank you enough!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top