Control PowerPoint 2007 from Word - VBA, Themes & Customise Handout Master

Hi Experts

I am trying to control PowerPoint from Word.  

I have created a customised template including a customised Handouts master.  I set everything up as I want it to be and have created a Theme.

When I create the presentation manually from PowerPoint by clicking New and choosing the customised template, the Handout master is formatted as I want it to be.  However, if I create the presentation from Word or if I create a presentation directly from PowerPoint based on the default template (i.e. Office Button & New & Blank Presentation) and apply the Theme to it then the Handout master format returns to the un-customised version.  I thought perhaps that I needed to apply the Theme to the Handout master seperately but with the Handout master open, if I click the 'Themes' button, all Themes are greyed out.

I am defintely getting a headache now :-(

Please can somebody tell me where I am going wrong with this?  The code I am using to create the presentation is attached.  

Thank you very much for your help.

Sub TryThis()
Dim oPPT As PowerPoint.Application
Dim oPres As PowerPoint.Presentation

Set oPPT = New PowerPoint.Application
oPPT.Visible = msoTrue

Set oPres = oPPT.Presentations.Add(msoTrue)
oPres.ApplyTemplate "c:\MySetup\MyStandard.potm"

Set oPPT = Nothing
Set oPres = Nothing
End Sub

Open in new window

MonteDelMarAsked:
Who is Participating?
 
Echo_SConnect With a Mentor Commented:
I don't do code, so I can't help there, but I can say that I don't think it's a problem with your code per se. What you're describing is a problem with PPT even when you do these steps manually, as you've discovered.

I'd call it a bug. The handouts master doesn't get applied when you apply themes and templates. They do exist in the template file itself, which is why, if you use File | New and base it on the customized template, you get the handout master.
0
 
MonteDelMarAuthor Commented:
Many thanks for your reply.

I wonder if there is another way to create the presentation via code that is effectively 'File New' based on the required template rather than applying it as I am doing now.
0
 
MonteDelMarAuthor Commented:
Thank you.  I think the answer does lie in the fact that this feature is buggy.  I just wonder if there are some ways around the various problems it causes in VBA.  Am going to post some specific VBA questions.
0
All Courses

From novice to tech pro — start learning today.