This was the business case i had for the following.
Powerpoint was being used by company A to produce sales books from a set of templates they had.
These sales books contain slides which were both vertical and horizontal orientation This was acheived by a manual process of creating two presentations (one horizontal, one vertical) Printing them out , and then a member of staff sorting out the order. This also left two ppt files containg the information in no sensible order.
This was the solution i came up.
Firslty i created two powerpoint presenations containg the templates, One for horizontal , one for vertical templates
I then used a third presentation for my code, which looked something like this
'Global pp_Final As Presentation ' Presenation we are creating
Global pp_Tools As Presentation ' This Presentation Global pp_Vert As Presentation ' All Vertical Slides Global pp_Horiz As Presentation ' All Horizontal slides Global sld_cnt as integer 'slide counter
Global Const str_TempPath As String = "C:\sales_books\"
'Reference the horizontal and vertical slides Set pp_Vert = Application.Presentations.Open(str_TempPath & "PackVertical.ppt", , msoFalse, msoFalse) Set pp_Horiz = Application.Presentations.Open(str_TempPath & "PackHoriz.ppt", , msoFalse, msoFalse)
Sld_Cnt = 1
'create a new presentation Set pp_Final = Application.Presentations.Add 'Page set up With pp_Final .PageSetup.SlideOrientation = msoOrientationMixed .PageSetup.SlideSize = ppSlideSizeA4Paper End With
'In my original code i used a series of Select cases to decide what 'was needed in the final tax pack and there was a lot more processing involved ' this is cut down so apologies for any errors but hopefully it will give you ' enough to see whats happening.