PowerPoint - How to call PP's builtin commands in VBA

Asked By Edwar on 18-Oct-08 02:11 PM
Hi Everybody,
I want to call PP's builtin commands (in this case decrease and increase
indenet) in my VBA code , How should I do it?
I know how to write the code for indent increase or decrease but instead of
writing my code I though it would be nice to call builtin functions instead
of writing my own, but unlike Excel or Word I can't see those builtin
commands in macros list .Any suggestions?
--
Best regards,
Edward


Shyam Pillai replied on 18-Oct-08 03:10 PM
Edward,
In PPT 2003, you can use the following commands:

'Increase indent
Commandbars.FindControl(Id:=3507).Execute
'Decrease indent
Commandbars.FindControl(Id:=3508).Execute

Regards,
Shyam Pillai

Animation Carbon - http://www.animationcarbon.com
Edwar replied on 18-Oct-08 03:34 PM
Shyam , you and Steve really helped me through out this process . I really
appreciate your help , and as I always say Microsoft and MSOffice community
owes a lot to you MVP guys.
Thanks a lot.
--
Best regards,
Edward
Steve Rindsberg replied on 20-Oct-08 03:26 AM
And because you're so kind as to say so, here's another handy little bit.
This'll give you a list of the control IDs in a file in C:\TEMP\ControlIDs.TXT
(change the name in the Open statement to put it someplace else).

Sub WhatControlIsWhich()

Dim sTemp As String
Dim oBar As CommandBar
Dim oCtrl As CommandBarControl

For Each oBar In Application.CommandBars
sTemp = sTemp & oBar.Name & vbCrLf

For Each oCtrl In oBar.Controls
sTemp = sTemp & vbTab & oCtrl.Caption & vbTab & oCtrl.Id & vbCrLf
Next

Next

Open "c:\temp\ControlIDs.txt" For Output As 1
Print #1, sTemp
Close #1

End Sub

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