How do I add an Gallery item to the quick access toolbar in PP?

D

Darmahart

I would like to add an item from a Gallery(not the gallery itself) to my
quick access toolbar or alternatively know the VBA code to take a picture and
add a particular shadow to an image on PowerPoint slides.
Thanks!
 
D

Darmahart

Yes that would help. What I want is to apply one shadow effect to all the
pictures in a PowerPoint show by either putting a button on the quick access
bar or using a keystroke. If there is code that will automatically do this by
default, that would be great!
 
J

John Wilson

This code will copy the format of a selected picture and then apply it to all
pictures. If you don't know how to use vba
see:http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html#vba

'code starts

Sub picformat()
Dim osld As Slide
Dim oshp As Shape
On Error GoTo errhandler
With ActiveWindow.Selection.ShapeRange(1)
If .Type <> msoPicture Then GoTo errhandler
..PickUp
End With
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoPicture Then oshp.Apply
Next oshp
Next osld
Exit Sub
errhandler:
MsgBox "Did you select a picture?", vbCritical
End Sub

'code ends
--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
 
D

Darmahart

Thanks for your help. The macro worked great, but I can't get it to work by
putting it on a template. I have my template that I added the code to and
when I make new PowerPoints from the template I get an error message. How can
I get it to work?

Thanks so much!
 
S

Steve Rindsberg

Thanks for your help. The macro worked great, but I can't get it to work by
putting it on a template. I have my template that I added the code to and
when I make new PowerPoints from the template I get an error message. How can
I get it to work?

Start by relieving our suspense; what did the error message say? ;-)
 
D

Darmahart

Opps - my bad. The error was 'The macro cannot be found or has been disabled
because of your security settings.'

fyi - I did change the trust settings to 'Trust access to the VBA project
object model' and saved the template with the macro in the default location.

Thanks!
 
S

Steve Rindsberg

Try setting Enable All Macros [dire warning] in the same dialog box as where you set
access to the VBA project. Restart PPT and try again. See if that helps.
 
D

Darmahart

Thanks! That worked. :)

Steve Rindsberg said:
Try setting Enable All Macros [dire warning] in the same dialog box as where you set
access to the VBA project. Restart PPT and try again. See if that helps.

Opps - my bad. The error was 'The macro cannot be found or has been disabled
because of your security settings.'

fyi - I did change the trust settings to 'Trust access to the VBA project
object model' and saved the template with the macro in the default location.

Thanks!

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

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