C# Powerpoint and password/readonly dialog

I

Ian Marshall

Does anyone know a way of by-passing the 'enter password or click
readonly' dialog that pops up when you open a PowerPoint presentation which
has been saved as 'edit password protected'.

I am using Office 2003 and c#. I have managed to implement a solution for
word docs very simply as:

m_WordInst.DisplayAlerts = MSWord.WdAlertLevel.wdAlertsNone;

But the 'comparable' command in powerpoint doesn't work for this
pwowerpoint dialog...

m_PPTInst.DisplayAlerts = MSPowerPoint.PpAlertLevel.ppAlertsNone;

I have tried implementing a KB307292 'dismiss' dialog solution but it
doesn't work.
Reason I am sure is: I call m_PPTInst.Open() from one thread while another
sits on a timer and waits for confirmation that open has returned. If I
don't get a confirmation in time the monitor thread looks to see if the
active dialog is 'Password' BUT any call to the app inst on the monitor
thread e.g. m_PPTInst.ActiveWindow generates a 0x8001010A error (Message
Filter indicated the application is busy) - This isn't too big a surprise
as the m_PPTInst.Open call obviously hasn't returned yet.

Oh the reason I am doing this is to do some specialised printing and
auditing on presentation dropped in a spool folder....

Any ideas gratefully received. Thanks in advance

Ian Marshall
 

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