PDA

View Full Version : Can't get .presentations.Open ThisWorkbook.Path & "\Pres.ppt" to work



gcservi
08-15-2012, 07:08 AM
Hi, all. New to forum (and pretty new to vba) but trying to piece together code from others. Below was submitted as a means to open a PTT from an Excel macro in the same directory, but I can't make the relative reference work. Any insight?

Private Sub OpenPowerPointTemplate()

Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
objPPT.Presentations.Open Filename:=ThisWorkbook.Path & "\Presentation template.pptx"
'Update links in PowerPoint template
objPPT.ActivePresentation.UpdateLinks
objPPT.Activate

End Sub