Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
'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\"
Sub CutdownExampleForFAQCreatingNewPresentation
'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.
'Firstly I add in a Vertical Slide
pp_Vert.Slides("sld_Cover").Copy
pp_Final.Slides.Paste
Sld_Cnt = Sld_Cnt + 1 'update counter
Set sld_Temp = pp_Final.Slides(Sld_Cnt) ' Select the slide
sld_Temp.Tags.Add "O", "V"
'Then a horizontal
pp_Horiz.Slides("sld_Map").Copy
pp_Final.Slides.Paste
Sld_Cnt = Sld_Cnt + 1 'update counter
Set sld_Temp = pp_Final.Slides(Sld_Cnt) ' Select the slide
sld_Temp.Tags.Add "O", "H"
'I now want to add in another Vertical Slide
pp_Vert.Slides("sld_Sales").Copy
pp_Final.Slides.Paste
Sld_Cnt = Sld_Cnt + 1 'update counter
End sub
Public Sub CutDownProcess()
Dim var As Slide
Dim str_tpath As String
Dim str_A As String
'change orientation on tag and print out
For Each var In pp_Final.Slides
select case var.tag("O")
case "V"
pp_Final.PageSetup.SlideOrientation = msoOrientationVertical
case "H"
pp_Final.PageSetup.SlideOrientation = msoOrientationHorizontal
end select
pp_Final.PrintOut var.slideindex,var.slideindex
Next
End Sub
Select Case strType
Case "H"
pp_Final.PageSetup.SlideOrientation = msoOrientationHorizontal
Pixwidth = 1110
Pixheight = 870
Case "V"
pp_Final.PageSetup.SlideOrientation = msoOrientationVertical
Pixwidth = 870
Pixheight = 1110
End Select
ExportPath = str_pth
Set oSlide = pp_Final.Slides(int_sld)
With oSlide
.Export ExportPath & "Slide" & CStr(.SlideIndex) & ".GIF", "GIF", Pixwidth, Pixheight
End With