Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / September 2004

Tip: Looking for answers? Try searching our database.

PowerPoint VBA Impossible Task!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Linda V - 28 Sep 2004 15:51 GMT
I need to be able to manipulate batches of PPT files so that the opening view
on all files is the same.  I have written some VBA code that does everything,
except for one thing (and I'm beginning to think that this is impossible).  
Here goes:

I set up the Presentation View to Normal View, so all 3 panes are showing.  
In the Outline/Slide Pane (Pane 1), I need to be able to set the
Outline/Slides tabstrip to always be set on the "Slides" tab.  If anyone
knows how to manipulate this, I would appreciate the help.

Currently, however the pane is set at the time of save is how it will show
up when the presentation view is switched to "Normal" view.  I have already
tried to set me PPT Open options to "Normal - Thumbnail, Notes, Slide".  This
does not work when opening files programmatically.

Below is a sample of the code:

   Presentations.Open filename:="C:/test.ppt", ReadOnly:=msoFalse
   ActiveWindow.ViewType = ppViewNormal

   ' This is the pane that needs to be set!
   ActiveWindow.Panes(1).Activate

   ActiveWindow.SplitHorizontal = 15
Shyam Pillai - 28 Sep 2004 16:55 GMT
Linda,
You cannot achieve it thru the object model since the viewtype property for
the panes is read-only but you can get around it using the following code:
Control ID 6015 toggles between thumbnails and outline view of the pane, It
appears in the Tools | Customize | Commands | Categories: View, Commands:
Show Outline.

' --------------------------------------------
ActiveWindow.ViewType = ppViewNormal
ActiveWindow.Panes(1).Activate
If ActiveWindow.Panes(1).ViewType = ppViewThumbnails Then
   CommandBars.FindControl(Id:=6015).Execute
End If
' --------------------------------------------
Signature

Regards
Shyam Pillai

Toolbox: http://www.mvps.org/skp/toolbox/

>I need to be able to manipulate batches of PPT files so that the opening
>view
[quoted text clipped - 25 lines]
>
>    ActiveWindow.SplitHorizontal = 15
Shyam Pillai - 28 Sep 2004 18:21 GMT
I've uploaded a page with the complete code snippet:

How to activate the tab of choice (Outline/Slides) in PowerPoint 2002 and
later
http://www.mvps.org/skp/pptxp017.htm
Signature

Regards
Shyam Pillai

Handout Wizard: http://www.mvps.org/skp/how/

>I need to be able to manipulate batches of PPT files so that the opening
>view
[quoted text clipped - 25 lines]
>
>    ActiveWindow.SplitHorizontal = 15
Linda V - 28 Sep 2004 19:35 GMT
Thank you!  This worked great.

Linda

> I've uploaded a page with the complete code snippet:
>
[quoted text clipped - 30 lines]
> >
> >    ActiveWindow.SplitHorizontal = 15
Maverick Woo - 28 Sep 2004 22:15 GMT
> [...]
> I set up the Presentation View to Normal View, so all 3 panes are showing.  
> In the Outline/Slide Pane (Pane 1), I need to be able to set the
> Outline/Slides tabstrip to always be set on the "Slides" tab.  If anyone
> knows how to manipulate this, I would appreciate the help.
> [...]

Try this instead:
   Presentations.Open filename:="C:/test.ppt", ReadOnly:=msoFalse
   ActiveWindow.ViewType = ppViewNormal
   SendKeys "%3", 1 ' slide
   ' This is the pane that needs to be set!
   ActiveWindow.Panes(1).Activate
   ActiveWindow.SplitHorizontal = 15

The only "trick" is to know what the keys Alt-1,2,3,4 do. Hope this helps.

Signature

Maverick Woo

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.