Enable/Disable Commandbar buttons in normal view

G

Gil_H

Hi EV1,

I've created an addin with a commandbar and a few commandbar buttons.
My wish is to control that command bar and Enable/Disable it's buttons
according to selection of a shape.
For example, one of the buttons involved with picture manipulation, so
if the user selects one of the pictures on the slide in a normal view,
i would like to enable the "Picture Command Bar Button". A few
questions:
1. Where do i put the code that defines Enable/Disable of a commandbar
button? (Normal View)
2. How do i know if a shape is selected? ( By now i found only the
Selection of ShapeRange )

I would be grateful if you could give me a code example.

Thanx,
Gil H
 
S

Shyam Pillai

Is picture command bar your custom bar or the one that ships with
PowerPoint? The in-built one automatically pops up if you select a picture
unless it has been hidden manually. To determine the selection, create an
event handler and trap the WindowSelectionChange event and check what the
selection is. You will get the code to create an event handler on Steve's
site http://www.pptfaq.com under the programming section.


--
Regards,
Shyam Pillai

Animation Carbon
http://www.animationcarbon.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