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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft PowerPoint

From novice to tech pro — start learning today.