Password

LoadOptions.Password property

获取或设置密码。可读写字符串。

public string Password { get; set; }

属性值

密码。

示例

以下示例代码演示如何打开受密码保护的PowerPoint演示文稿。

[C#]
	LoadOptions loadOptions = new LoadOptions {Password = "YOUR_PASSWORD"};
	using (Presentation presentation = new Presentation("pres.pptx", loadOptions))
	{
	  // 操作解密后的演示文稿
	}

另见