Hi,
I am using the following code a to create a presentation from a pot template and then add new slides from different presentations. The master template has 4 title/slide masters in it and when it copys over the template it only copies the first title/slide master. Is their a way to copy over all 4 templates?
I need to add new slides from different presentations but it keeps the original slide master template and I need all the slides added to use the company master. Can you replace the master on the added slides so the are all the same?
I would very much appreciate it if you could help me with my code because I am stuck....Thanks
'Master Template (4 Title/Slide Master Combinations)
Dim Template = New Presentation(MapPath(".") + "\\Template3.pot")
'Destination File
Dim DestinationPPT = New Presentation(MapPath(".") + \\Blueprint3.ppt)
Dim DestinationSlide = DestinationPPT.GetSlideByPosition(1)
Dim Sorted As SortedList = New SortedList()
'Clone Template
Template.CloneSlide(Template.GetSlideByPosition(1), 1, DestinationPPT, Sorted)
'Remove First Slide
DestinationPPT.Slides.Remove(DestinationSlide)
DestinationPPT.DeleteUnusedMasters()
'Clone Slide From New Presentation
Dim ImportPPT = New Presentation(MapPath(".") + \\hot2.ppt)
Dim slide As Slide
slide = ImportPPT.GetSlideByPosition(1)
ImportPPT.CloneSlide(slide, DestinationPPT.Slides.LastSlidePosition + 1, DestinationPPT, Sorted)
'Build Browser Info
Me.Response.ContentType = "application/vnd.ms-powerpoint"
Me.Response.AppendHeader("Content-Disposition", "attachment; filename=result.ppt")
Me.Response.Flush()
Dim st As System.IO.Stream = Me.Response.OutputStream
'Send The File
DestinationPPT.Write(st)
Me.Response.End()