

Setting a password on a file provides additional protection when sending personal data, research results or internal official documents. Even if the document accidentally reaches another person, a password will be required to open it.
To do this, you need to choose a password that restricts opening the file. Merely prohibiting editing does not hide the document's content from outsiders. It is important to understand this difference before setting up protection.
Open password and editing restriction
Programs offer several similarly named protection tools:
Open password — requires entering a password before viewing the file's content.
Editing or permissions password — used to restrict actions such as making changes to the document, printing or copying.
For example, when protecting a document containing students' personal data, its opening must be restricted. Limiting yourself to the "editing not allowed" setting alone is not enough. In PDF programs, the document open password and usage permissions are also managed separately.
Setting a password on a Word file
In Word for Windows, you can use the following procedure:
Open the document and go to the File tab.
Select Info → Protect Document → Encrypt with Password.
Enter the password and click OK.
Enter the password again to confirm.
Save the document.
In Word for Mac, the protection window opens via Review → Protect → Protect Document. There, select the password field for opening the document, confirm the password and save the file. Menu names may vary depending on the program's language and version.
The browser version of Word does not allow encrypting a document with a password; for this, use the Word application installed on your computer.
Setting a password on a PDF file with Adobe Acrobat
In a version of Adobe Acrobat that supports password protection:
Open the PDF file.
Go to All tools → Protect a PDF.
Select Advanced options → Encrypt with Password.
Check Require a password to open the document.
Type the password in the Document Open Password field.
Re-enter the password to confirm and save the file.
Make sure that the setting requiring a password to open the document is the one selected. Do not confuse it with merely setting printing or editing restrictions.
Protecting a PDF with Preview on a Mac
The Preview app on a Mac can also restrict opening a PDF with a password:
Open the PDF in Preview.
Select File → Export.
Give the new copy a different name to keep the original file.
Click the Permissions button.
Check Require Password To Open Document.
Enter and confirm the open password.
Also fill in the Owner Password field.
Click Apply, then Save.
The open password and the password that manages document permissions serve different purposes. Menus may differ slightly depending on the macOS version.
Choose and store your password carefully
Do not use easily guessed combinations such as a name, date of birth, phone number or "123456". Do not reuse the password of another account for the document. Choose a separate password that is hard to guess and as long as the program allows.
It is advisable to store the password in a reliable password manager or in a secure way specified by the institution. Do not write it in the file name and do not send it in the same message as the protected document. Deliver the password to the recipient via another, pre-agreed communication channel.
Forgetting the password may make it difficult to access the document. Microsoft Word usually cannot recover a forgotten open password.
Test the protection before sending
Close the saved file and open it again. Check that a password is requested before the document's content is displayed. Then make sure that the file you are sending is the protected copy.
If you convert a Word document to PDF, check the protection of the new PDF separately as well. Do not assume that the password set on the original file automatically carries over to a copy in another format.
Avoid uploading a confidential document to an unknown online service to set a password. Use a trusted program on your computer or a tool approved by the institute.
A password is more useful when combined with checking whom the document is sent to, removing unnecessary information and managing sharing permissions. Also keep in mind that anyone who knows it can open the document and share its content by other means.