VBA- how to refrence ribbon commands

E

Edward

Hi everybody,
In PP 2003 I use
CommandBars.FindControl (id :=3508).Execute to apply decrease indent , but
with new ribbon in pp2007 thsi code dosn't work anymore .what is the
equivalent code in PP2007?
Thanks.
 
E

Edward

Thanks steve. Indent level is not Necessarily 3 , I use all 9 level and I
want to promote demote levels smoothly . I think instead of constant 3 if I
use the existing indent (+/-) 1 it will do the job , but I remember I did
this in 2003 and I was getting errors . However if I can't find a way to
active ribbon commands I must do this way.
In general do you know how can we execute a Ribbon command in office 2007 ?
 
E

Edward

Microsoft gives this download which shows all office 2007 command IDs

http://www.microsoft.com/downloads/...E9-4D11-46A5-898D-23E4F331E9AE&displaylang=en

and in this artcle , it explains that Office 2007 still works with the 2003
findcontrl method.
http://msdn.microsoft.com/en-us/library/dd627337.aspx

I check the powerpoint 2007 IDs and for Increase and decrease indent Ids are
the same as 2003 , but code dosn't work !. but when I replace the id with
other IDs like open a dilog box or ... it works .

Is this a bug ? During the conversion process from 2003 to 2007 I have
notices that many new objects and also old ones that are in 2007 are still
incomplete , is this a correct assumption?
 
S

Shyam Pillai

Edward,
It's not a bug, you have to use the methods available in PPT 2007.

The command to use is:

'Indent increase
Application.CommandBars.ExecuteMso "IndentIncrease"

'Indent decrease
Application.CommandBars.ExecuteMso "IndentDecrease"


For this code to work, the textbox should be in text input mode else it will
fail.

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