How Can I Apply a New Template to a PowerPoint Presentation?
You answered that question
http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept07/hey0921.mspx
but what about subfolders?
C:\Presentations\Newly\DR\2\
and
C:\Presentations\Newly\DR\
and
C:\Presentations\Oldestones\PRF\3\
i have a lot of subfolders and it contains 3000 ppts
-code-
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:\Presentations'} Where " _
& "ResultClass = CIM_DataFile")
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = true
For Each objFile In colFileList
If objFile.Extension = "ppt" Then
Set objPresentation = objPPT.Presentations.Open(objFile.Name)
objPresentation.ApplyTemplate _
("C:\Program Files\Microsoft Office\Templates\Presentation
Designs\Ocean.pot")
objPresentation.Save
objPresentation.Close
End If
Next
objPPT.Quit