Compartir a través de


WorkbookBase.ProtectSharingEx Method

Definition

Saves the workbook and protects it for sharing.

public void ProtectSharingEx (object filename, object password, object writeResPassword, object readOnlyRecommended, object createBackup, object sharingPassword, object fileFormat);
member this.ProtectSharingEx : obj * obj * obj * obj * obj * obj * obj -> unit
Public Sub ProtectSharingEx (Optional filename As Object, Optional password As Object, Optional writeResPassword As Object, Optional readOnlyRecommended As Object, Optional createBackup As Object, Optional sharingPassword As Object, Optional fileFormat As Object)

Parameters

filename
Object

The name of the saved file. You can include a full path; if you do not, Microsoft Office Excel saves the file in the current folder.

password
Object

A case-sensitive password for the workbook. If this argument is omitted, you can unprotect the workbook without using a password. Otherwise, you must specify the password to unprotect the workbook.

writeResPassword
Object

The write-reservation password for this file. If a file is saved with the password and the password is not supplied when the file is opened, the file is opened read-only.

readOnlyRecommended
Object

true to display a message when the file is opened, recommending that the file be opened read-only.

createBackup
Object

true to create a backup file.

sharingPassword
Object

The password to be used to protect the file for sharing.

fileFormat
Object

A string that indicates the file format.

Remarks

Use strong passwords that combine uppercase and lowercase letters, numbers, and symbols. Weak passwords do not mix these elements. For example, "Y6dh!et5" is a strong password, but "House27" is a weak password. Use a strong password that you can remember so that you do not have to write it down.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Applies to