problem with vb.net and powerpoint automation

  • Thread starter Thread starter Rut
  • Start date Start date
R

Rut

Does anyone know how to start powerpoint from vb.net without the ppt
screen appearing. I want to keep it hidden? Using this code:

Try
pp = New PowerPoint.Application
pp.Visible = Office.MsoTriState.msoTrue
pp.WindowState =
PowerPoint.PpWindowState.ppWindowMinimized

Application.DoEvents()
Catch ex As Exception
MsgBox("Error opening powerpoint. Error is: " &
ex.ToString)
Me.Close()
Exit Sub
End Try

The main ppt screen appears momentarily and then minimizes. I've tried
setting .visible to false and get error message: Invalid operation.
Hiding application is not allowed.

Is there some way to lock the screen to prevent this initial
flickering?

Thanks,
RUt
Post a follow-up
 
Does anyone know how to start powerpoint from vb.net without the ppt
screen appearing. I want to keep it hidden? Using this code:
Is there some way to lock the screen to prevent this initial
flickering?


What if you pass the /S command-line switch to PowerPoint when you start
it? That's supposed to suppress the splash screen.
 
Since I'm using the object model, there is no way to pass command line
parameters (that I'm aware of).

Thanks,
rut
 
Back
Top