ActiveDocument.Password = "kingsoft"If ActiveDocument.HasPassword = True Then MsgBox "密码设置完成。" End If