automating powerpoint with vb.net

  • 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
 
Rut,
Remove this line.
pp.Visible = Office.MsoTriState.msoTrue

Regards
Shyam Pillai
 

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

Back
Top