However, I do have one question. When the PowerPoint is being opened, is it possible to have it opened with the company's Theme Color? The company I'm working requires this for every PowerPoint. I believe you mentioned a freeware on a different forum (nattyware/pixie), but I can't download it at this moment since it's blocked at work. The location of the file (that includes the layout/office theme) is "H:\My Documents\PPT Automation". The name of the layout is called: "OC-E PPT template - September". The VBA script down below is what I have thus far:
Sub Test()
With ActivePresentation
.Slides.AddSlide .Slides.Count + 1, .Designs(1).SlideMaster.CustomLayouts(GetLayoutIndexFromName("OC-E PPT template - September", .Designs(1)))
End With
End Sub
Function GetLayoutIndexFromName(sLayoutName As String, oDes As Design) As Long
Dim x As Long
For x = 1 To oDes.SlideMaster.CustomLayouts.Count
If oDes.SlideMaster.CustomLayouts(x).Name = sLayoutName Then
GetLayoutIndexFromName = x
Exit Function
End If
Next
End Function
As of right now, it's not working. It gives the error: "ActiveX component can't create object."
Is it possible - in addition to the previous VBA script - to give the newly opened PPT the respected layout and Office Theme?
Yours sincerely,
Djani