どうせ誰も読んでない( *゚∀゚)v―.o.oo

だれも読んでないと思って勝手なことを!

パワーポイントを開く時に、読み取り専用か否かを選択出来るようにするvba

PowerPointを読み取り専用モードで開くかどうかを選択する。

 

Sub Auto_Open()
Dim sReadOnly As String
sReadOnly = MsgBox("Do you want to open this file in read-only mode?", vbYesNo, "Read-Only?")
If sReadOnly = vbYes Then
ActivePresentation.FollowHyperlink Address:=ActivePresentation.FullName & "?Readonly=1"
'コメントアウトされたコードはPowerPoint2010以前のバージョンで利用する場合は有効化する
'ActivePresentation.FollowHyperlink Address:=ActivePresentation.FullName & "&ReadOnly=1"
End If
End Sub