'How to use powerpoint vba, Dock the Selection Panel on the right and The following TaskPanes are on the left, and are expanded - Fill, Size, Picture
The environment I use is office365
How to use powerpoint vba,
Like the picture below
Dock the Selection Panel on the right
and The following TaskPanes are on the left, and are expanded :
Fill and Line
Size and Position
Picture Corrections Crop
I refer to the results here
because what I want is something like this.
Dock TaskPanes right using VBA for Word 07?
I have tested the code for this answer.
It works fine and is great!
' Opens the Formatting task pane (Style window)
Application.TaskPanes(wdTaskPaneFormatting).Visible = True
' Docks the Formatting pane on the right
Application.CommandBars("Styles").Position = msoBarRight
But I found that powerpoint seems to Not like word,
Application.TaskPanes(wdTaskPaneFormatting).Visible = True
there is this attribute can call.
in Powerpoint options
You can find it here

Item name 
Fill and Line
Size and Position
Picture Corrections Crop



I have tried
The following code works
ActiveWindow.Activate
If Not CommandBars.GetPressedMso("SelectionPane") Then CommandBars.ExecuteMso ("SelectionPane")
'Show the Selection Panel on the right
The following code does not work
After I ran it,
I got the following result.
ActiveWindow.Activate
If Not CommandBars.GetPressedMso("ObjectSizeAndPositionDialog") Then CommandBars.ExecuteMso ("ObjectSizeAndPositionDialog")
'Size and Position panel
If Not CommandBars.GetPressedMso("PictureCorrectionsDialog") Then CommandBars.ExecuteMso ("PictureCorrectionsDialog")
'Picture Corrections Crop panel
'I want to activate these panels -
'Fill and Line
'Size and Position,
'Picture Corrections Crop
'I don't know how to make it go to the left and expand
'I don't know Fill and Line panel its ExecuteMso id
'I know Size and Position panel its ExecuteMso id is - ObjectSizeAndPositionDialog
'I know Picture Corrections Crop panel its ExecuteMso id is - PictureCorrectionsDialog

Solution 1:[1]
Fill and Line
Size and Position
Picture Corrections Crop
CommandBars.ExecuteMso ("ObjectSizeAndPositionDialog") 'not work
I found that
this code is wrong.
because I didn't select the object.
so You can first select it with the mouse.
Or do what I did
and use the program to select 1 thing
ActiveWindow.View.Slide _
.Shapes.Placeholders.Item(3).TextFrame.TextRange.Select
Fill and Line
Sub openPaneSltFill()
ActiveWindow.Activate
If Not CommandBars.GetPressedMso("SelectionPane") Then CommandBars.ExecuteMso ("SelectionPane") 'y
'Application.CommandBars.ExecuteMso ("SelectionPane") 'y but little problem
ActiveWindow.View.Slide _
.Shapes.Placeholders.Item(3).TextFrame.TextRange.Select 'need select obj or will bug
Application.CommandBars.ExecuteMso ("MoreLines2")
'Application.CommandBars("MoreLines2").Position = msoBarLeft 'not work ; I don't know how to dock it on the left
End Sub
Size and Position
Sub openPaneSltObjSize()
ActiveWindow.Activate
If Not CommandBars.GetPressedMso("SelectionPane") Then CommandBars.ExecuteMso ("SelectionPane") 'y
'Application.CommandBars.ExecuteMso ("SelectionPane") 'y but little problem
ActiveWindow.View.Slide _
.Shapes.Placeholders.Item(3).TextFrame.TextRange.Select 'need select obj or will bug
Application.CommandBars.ExecuteMso ("ObjectSizeAndPositionDialog")
'Application.CommandBars("ObjectSizeAndPositionDialog").Position = msoBarLeft 'not work ; I don't know how to dock it on the left
End Sub
Picture Corrections Crop
need select Pic first
Sub openPanePicPst()
ActiveWindow.Activate
If Not CommandBars.GetPressedMso("SelectionPane") Then CommandBars.ExecuteMso ("SelectionPane") 'y
'Application.CommandBars.ExecuteMso ("SelectionPane") 'y but little problem
Application.CommandBars.ExecuteMso ("PictureCorrectionsDialog") 'need select Pic or will bug
'Application.CommandBars("PictureCorrectionsDialog").Position = msoBarLeft 'not work ; I don't know how to dock it on the left
End Sub
But I still can't find a way
Dock The following TaskPanes are on the left,
and are expanded.
Fill and Line
Size and Position
Picture Corrections Crop
If there is a very good person
willing to help
I would be very grateful to him
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
