LoginSignup
1
0

More than 5 years have passed since last update.

パスワード付きPowerPointファイルをマクロで扱う

Last updated at Posted at 2015-12-08

まずOfficeのバージョンによりこのHotfixが必要
https://support.microsoft.com/en-us/kb/916154
といっても 2003 用なので現在は特に問題ないかも。

そして下記の通り。

This hotfix provides functionality so that you can append the password to the file name that is passed to the Open method in the macro. The password is delimited from the file name by two colons (::). This delimitation is supported for the Read password and for the Modify password.

The syntax that is used to append the Read password and the Modify password is as follows:
vbnet
Open( "filename.ppt::readpassword::modifypassword" )

Openメソッドのファイル名の後に :: をつけてパスワードをつければ良い。
この仕様を決定した担当者の苦悩を思うと、なかなかに味わい深い。

To specify a Read password when the presentation is opened, use the following syntax:
vbnet
Open( filename.ppt::readpassword)

To specify a Modify password when the presentation is opened, you must provide the Read password as blank and then specify the Read password. To do this, use the following syntax:
vbnet
Open( filename.ppt::::modifypassword" )

Note Read passwords cannot contain two colons (::) as part of the password.

既に::をパスワードに指定している場合は駄目とのこと。
現実的にはほとんど無いだろうけど、やはり味わい深い。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0