PC freeze when printing ppt from VB

X

Xav

Hi all

I have an small program that automatically converts .doc, .xls or .ppt
documents into pdf documents using Visual Basic and the Acrobat
ditiller printer.
It works perfectly fine for doc and xls documents but for the ppt
documents I have a random PC freezing problem :-/

Sometimes, apparently randomly, my PC completely freeze at the moment
the powerpoint application is supposed to open the presentation to
print it.
The only way is to kill the powerpoint process, then the application
goes on converting the other documents, even ppt if there are others.

I have tested the application with Powerpoint XP and Powerpoint 97 and
the problem occurs with both versions.

I don't think it is caused by a conflict with previous converted
documents as i wait each time for the pdf to be created and copied
before trying to convert the following one.


Here is my code for the ppt opening and printing :

Set MyPowerPoint = CreateObject("powerpoint.application")

With MyPowerPoint

.Visible = True

.WindowState = ppWindowMinimized


' It frezzes between here

.Presentations.Open FileName:=PDFIn$

.ActivePresentation.PrintOut

' and here

.ActivePresentation.Close

End With


If anyone has an idea i would really be gratefull ^^

Xav.
 
X

Xav

Hi

Thanks for your response.
I don't think it comes from that point because most of the time
everyting works fine.
Before calling that procedure i set the default printer to the
distiller printer.
And all the Windows' printer settings have been modified to output the
file correctly.

I was rather wondering if there could be some kind of known problem
with the powerpoint print method when using it from VB...
I noted that, for example, it appears to be more likely to freeze when
i have Outlook Express running... This is the kind of weird problem I
have...

Anyway thaks again for your response.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top