Log in

View Full Version : PowerPoint 2010 Problem with Create video



cens
04-10-2013, 06:05 AM
Hi,
I want to use this code to make a movie from PP



Sub TestCreateSampleVideo()
' Change the file path and name as required.
CreateSampleVideo ActivePresentation, "C:\TEMP\Video.wmv"
End Sub

Sub CreateSampleVideo(pres As Presentation, fileName As String)
' Presentation.CreateVideo does its work asynchronously.
' You can use the Presentation.CreateVideoStatus property
' to periodically check the status, and react accordingly.

pres.CreateVideo fileName, DefaultSlideDuration:=1, VertResolution:=480

' Now wait for the conversion to be complete:
Do
' Don't tie up the user interface; add DoEvents
' to give the mouse and keyboard time to keep up.
DoEvents
Select Case pres.CreateVideoStatus
Case PpMediaTaskStatus.ppMediaTaskStatusDone
MsgBox "Conversion complete!"
Exit Do
Case PpMediaTaskStatus.ppMediaTaskStatusFailed
MsgBox "Conversion failed!"
Exit Do
Case PpMediaTaskStatus.ppMediaTaskStatusInProgress
Debug.Print "Conversion in progress"
Case PpMediaTaskStatus.ppMediaTaskStatusNone
' You'll get this value when you ask for the status
' and no conversion is happening or has completed.
Case PpMediaTaskStatus.ppMediaTaskStatusQueued
Debug.Print "Conversion queued"
End Select
Loop
End Sub


When you run this macro, it stop and wait for mouse click or move in active PP window (top bar of window). If you don't click, macro is still waiting. It is visible on progress bar at the bottom of window (is visible only after click, then it start make video).

Have you got any idea how to force macro to make a movie without click/move? I need this automaticly,

John Wilson
04-10-2013, 11:09 AM
Works fine here.

cens
04-10-2013, 12:58 PM
I don't think so..
In presentation pres alt+f8 and run macro, but keep mouse cursor at the center of slide or without PP window. I check it on few computers and macro still waiting for mouse move.

John Wilson
04-11-2013, 12:04 AM
As I said it works here. I started it from the ribbon but Alt f8 > Run works for me too. I don't have to move or click the mouse.

It can take a long time to create a video - have you tried the code with a simple one slide presentation?

cens
04-11-2013, 10:30 AM
look here, I recorded desktop to show you what is teh problem

youtu.be/JtSk5P59IHw

John Wilson
04-11-2013, 10:32 PM
I see your problem but it definitely works properly here so it isn't the actual code. Most of the Microsoft code is not needed so maybe just try the bare minimum

Sub TestCreateSampleVideo()
' Change the file path and name as required. This is the desktop
CreateSampleVideo ActivePresentation, Environ("USERPROFILE") & "\Desktop\Video.wmv"
End Sub

Sub CreateSampleVideo(pres As Presentation, fileName As String)
pres.CreateVideo fileName, DefaultSlideDuration:=1, VertResolution:=480
End Sub

Otherwise my guess is a n AddIn or other program is conflicting

cens
04-11-2013, 11:58 PM
John, thank you so much, it works!

John Wilson
04-12-2013, 12:39 AM
Good to know but weird!

madelinekim
04-22-2013, 02:34 AM
This is such a nice information you people share about video creating in PowerPoint. PowerPoint is the tool which you can use for design presentation about your topic in which you can include text, audio, video etc to present important information.

John Wilson
04-28-2013, 07:20 AM
Have you thought about not spamming forums? It doesn't do your training image any good at all!