J
jwwarrenva
How can I set the design template for a selected slide to the default
design in VBA?
The way this is done from the Slide Design task pane is that you first
select the slide you want to change, then click on the icon for the
default design template, for which a pop-up reads "Default
Design.pot". You then click on the down-arrow and click on "Apply to
Selected Slides". I need to accomplish this from VBA.
The problem is that the macro recorder yields
ActivePresentation.ApplyTemplate FileName := ""
which doesn't work. You get a "PowerPoint could not open the file"
run-time error if you try to run the recorded macro. To set the
design to something other than the default, you would specify the name
of a .pot file, for example Clouds.pot. (You have to specify the
complete path to the file.) These files are normally found in the
Office Templates\Presentation Designs folder; however, the folder does
not contain a "Default Design.pot". Using ApplyTemplate with one of
the files in the Presentation Designs folder works OK for me, but
attempting to use "Default Design.pot" as the file does not, whether
or not preceded by the path to the Presentation Designs folder.
My environment: Microsoft Office PowerPoint 2003 SP2 under Windows XP
SP2.
Any advice would be appreciated.
Thanks,
John
design in VBA?
The way this is done from the Slide Design task pane is that you first
select the slide you want to change, then click on the icon for the
default design template, for which a pop-up reads "Default
Design.pot". You then click on the down-arrow and click on "Apply to
Selected Slides". I need to accomplish this from VBA.
The problem is that the macro recorder yields
ActivePresentation.ApplyTemplate FileName := ""
which doesn't work. You get a "PowerPoint could not open the file"
run-time error if you try to run the recorded macro. To set the
design to something other than the default, you would specify the name
of a .pot file, for example Clouds.pot. (You have to specify the
complete path to the file.) These files are normally found in the
Office Templates\Presentation Designs folder; however, the folder does
not contain a "Default Design.pot". Using ApplyTemplate with one of
the files in the Presentation Designs folder works OK for me, but
attempting to use "Default Design.pot" as the file does not, whether
or not preceded by the path to the Presentation Designs folder.
My environment: Microsoft Office PowerPoint 2003 SP2 under Windows XP
SP2.
Any advice would be appreciated.
Thanks,
John