Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-01-2013, 11:30 PM
tinfanide tinfanide is offline PowerPoint VBA: ApplyTemplate & absolute path Windows 7 64bit PowerPoint VBA: ApplyTemplate & absolute path Office 2010 32bit
Expert
PowerPoint VBA: ApplyTemplate & absolute path
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default PowerPoint VBA: ApplyTemplate & absolute path


Code:
''' in Excel
Sub GenerateQuizSlides()

Dim oPowerPoint As Object, oPresentation As Object

Set oPowerPoint = CreateObject("PowerPoint.Application")
oPowerPoint.Visible = True
Set oPresentation = oPowerPoint.Presentations.Add(WithWindow:=msoTrue)

'' error
'' Run-time error '-2147188160 (80048240)':
'' Automation error
oPresentation.ApplyTemplate Filename:="test.potm"
''

'' no error
''oPresentation.ApplyTemplate Filename:="C:\Users\Tin\Desktop\test.potm"
''

oPresentation.Close
oPowerPoint.Quit
Set oPresentation = Nothing
Set oPowerPoint = Nothing

End Sub
Why does ApplyTemplate need absolute paths of files?
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for absolute text box re-position hobbsbaboo PowerPoint 0 03-15-2012 01:44 AM
PowerPoint Motion Path Triaba PowerPoint 1 12-19-2011 12:47 AM
How do I align image at ABSOLUTE top left of a table cell? shnoozin Outlook 0 07-22-2011 03:30 PM
PowerPoint VBA: ApplyTemplate & absolute path How To Get Image to be absolute center of slide mjg060468 PowerPoint 3 08-09-2010 02:07 PM
truncating path or renaming audio file to play in powerpoint rbookend PowerPoint 0 05-02-2006 03:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft