Automating PowerPoint: Error

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi!,
I am getting an error:
'PowerPoint is unable to create multiple directories
while exporting'
when i am converting a presentation through VB. Are
there any parameters that i have consider here or any
other settings?
Thanks, Peter
 
Hello Mike,

i have the following code:

Dim objppt As Object
Dim objpptdoc As Object

Dim sPath As String
Dim sOutput As String
Dim theformat As Integer

Set objppt = CreateObject("PowerPoint.Application")

sPath = FileToConvertPathSource
sOutput = FileToConvertPathDestination

objppt.Visible = True
Set objpptdoc = objppt.Presentations.Open(sPath, , ,
True)

objpptdoc.Export sOutput, "JPG"
objpptdoc.Close

Set objpptdoc = Nothing
objppt.Quit
Set objppt = Nothing

...i have taken createobjects so that i can instantiate
across versions of office powerpoint. Thanks again, Peter

p.s. i have noticed that i get the error on NTFS drives
and not so on FAT formatted drives.
 
Hi Chirag, thanks for the reply..
i have the following code:

Dim objppt As Object
Dim objpptdoc As Object

Dim sPath As String
Dim sOutput As String
Dim theformat As Integer

Set objppt = CreateObject("PowerPoint.Application")

sPath = FileToConvertPathSource
sOutput = FileToConvertPathDestination

objppt.Visible = True
Set objpptdoc = objppt.Presentations.Open(sPath, , ,
True)

objpptdoc.Export sOutput, "JPG"
objpptdoc.Close

Set objpptdoc = Nothing
objppt.Quit
Set objppt = Nothing

...i have taken createobjects so that i can instantiate
across versions of office powerpoint. Thanks again, Peter

p.s. i have noticed that i get the error on NTFS drives
and not so on FAT formatted drives.
 
Peter, I was able to use your code without any problems. I exported to my
local drive and a network drive. My machine as well as the network drives
are NTFS drives though. I do not have a FAT32 drive to export to. I would
suggest the problem is with permissions where you are trying to export to.
Does the user you are logged in as have permissions to create files and
folders in the export folder? Logged in as the same user can you run
notepad and try to save a file and/or create a directory in that path? It
might also be some issue if you are running PowerPoint on a FAT32 machine
and trying to export to an NTFS drive. I don't know about that one. I do
not think the problem is in the code but in the environment.
 
Back
Top