B
brett
Using a macro, I need to switch to normal view, change the first pane to
thumbnails, and select slides 3 and 5.
I found Shyam's code to change to thumbnails and I appended it with
"pane(1).activate" so I could select slides in it. But I can only select a
contiguous range. For example, it selects slides 3-5 instead of 3 and 5. If
thumbnails were already displayed in pane(1), the non-contiguous selection
code works, but if it first has to be switched over to thumbnails (using
this code) it then only allows a contiguous range.
I know the outline tab is limited to contigous range selection, and it seems
PowerPoint thinks it's still in the outline tab after having run this code
to change to thumbnails - when my selection is made. So, I'm confused. Is
there any way to let this macro finish by selecting the non-contiguous range
I set?
Sub SetSlideTab()
Dim oCmdButton As CommandBarButton
Set oCmdButton = CommandBars("Standard").Controls.Add(Id:=6015)
DoEvents
ActiveWindow.ViewType = ppViewNormal
If Not oCmdButton Is Nothing Then
If ActiveWindow.Panes(1).ViewType = ppViewOutline Then
oCmdButton.Execute
End If
oCmdButton.Delete
Set oCmdButton = Nothing
End If
ActiveWindow.Panes(1).Activate
ActivePresentation.Slides.Range(Array(3, 5)).Select
End Sub
thumbnails, and select slides 3 and 5.
I found Shyam's code to change to thumbnails and I appended it with
"pane(1).activate" so I could select slides in it. But I can only select a
contiguous range. For example, it selects slides 3-5 instead of 3 and 5. If
thumbnails were already displayed in pane(1), the non-contiguous selection
code works, but if it first has to be switched over to thumbnails (using
this code) it then only allows a contiguous range.
I know the outline tab is limited to contigous range selection, and it seems
PowerPoint thinks it's still in the outline tab after having run this code
to change to thumbnails - when my selection is made. So, I'm confused. Is
there any way to let this macro finish by selecting the non-contiguous range
I set?
Sub SetSlideTab()
Dim oCmdButton As CommandBarButton
Set oCmdButton = CommandBars("Standard").Controls.Add(Id:=6015)
DoEvents
ActiveWindow.ViewType = ppViewNormal
If Not oCmdButton Is Nothing Then
If ActiveWindow.Panes(1).ViewType = ppViewOutline Then
oCmdButton.Execute
End If
oCmdButton.Delete
Set oCmdButton = Nothing
End If
ActiveWindow.Panes(1).Activate
ActivePresentation.Slides.Range(Array(3, 5)).Select
End Sub