Display 'read only' dialog (vba)

  • Thread starter Thread starter kimkom
  • Start date Start date
K

kimkom

Hi all,

Can someone please tell me how to display a dialog if a pps is currently in
'read only' mode?

For instance:
Pressing an Enter button on the opening slide of a presentation runs a macro
which checks if it's currently in 'read only' mode and if so displays a
MsgBox or certain slide.

Many thanks,
Michael
 
Which version of PowerPoint are you using? You can password protect some
versions of PowerPoint. Normally the enter key is used to transaction form
one slide to the next

--
Michael Koerner
MS MVP - PowerPoint


Hi all,

Can someone please tell me how to display a dialog if a pps is currently in
'read only' mode?

For instance:
Pressing an Enter button on the opening slide of a presentation runs a macro
which checks if it's currently in 'read only' mode and if so displays a
MsgBox or certain slide.

Many thanks,
Michael
 
With Application.ActivePresentation
If .ReadOnly Then
Msgbox "This file is opened in read only mode."
End With


Austin Myers


Creators of PFCMedia and PFCPro
 
Thanks.

Michael, I'm using 2007 but the end user is on 2003.

Austin, thanks for that I'll give it a try.

Steve, I'll try! ;-)

Michael
 
Austin,

I have tried applying the code to a button with no effect after changing the
read only state i.e.:

Sub ReadOnlyTest()
With Application.ActivePresentation
If .ReadOnly Then
Msgbox "This file is opened in read only mode."
End With
End Sub

I've also tried:

Sub ReadOnlyTest()
If ActivePresentation.ReadOnly = msoTrue Then
MsgBox "Read Only"
End If
End Sub


Any suggestions please?


Background info:

It is my intention to use this to check to determine whether another user on
a shared network currently has the same presentation open i.e. UserA clicks a
hyperlink to open the file, UserB then opens the same file but in read only
format. Pressing an 'Enter' button on the opening slide then runs the
ReadOnlyTest() Sub.

Is this possible? Am I going about this the correct way?

Thanks,
Michael
 
Apologies Austin,

I should check my own code more carefully! There was an error in another
part of my code, your code works fine.

Thank you
Michael
 
Back
Top