# Load Password-Protected Documents Compare password-protected PDF, Word, Excel, and PowerPoint documents by supplying passwords through LoadOptions using GroupDocs.Comparison for Python via .NET. [GroupDocs.Comparison for Python via .NET](https://products.groupdocs.com/comparison/python-net) can compare password-protected documents. Supply the source password through a [`LoadOptions`](https://reference.groupdocs.com/comparison/python-net/groupdocs.comparison.options/loadoptions) instance when constructing the `Comparer`, and the target password through a separate `LoadOptions` when calling `add()`. ## Example: Compare a password-protected source and target {{< tabs "load-password-protected">}} {{< tab "load_password_protected_documents.py" >}} ```python from groupdocs.comparison import Comparer from groupdocs.comparison.options import LoadOptions def load_password_protected_documents(): source_load = LoadOptions() source_load.password = "1234" target_load = LoadOptions() target_load.password = "5678" with Comparer("./source_protected.docx", source_load) as comparer: comparer.add("./target_protected.docx", target_load) comparer.compare("./result.docx") if __name__ == "__main__": load_password_protected_documents() ``` {{< /tab >}} {{< tab "source_protected.docx" >}} {{< tab-text >}} `source_protected.docx` is a password-protected source file. Click [here](https://docs.groupdocs.com/comparison/python-net/_sample_files/developer-guide/loading-documents/load-password-protected-documents/source_protected.docx) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "target_protected.docx" >}} {{< tab-text >}} `target_protected.docx` is a password-protected target file. Click [here](https://docs.groupdocs.com/comparison/python-net/_sample_files/developer-guide/loading-documents/load-password-protected-documents/target_protected.docx) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "result.docx" >}} ```text Binary file (DOCX, 24 KB) ``` [Download full output](https://docs.groupdocs.com/comparison/python-net/_output_files/developer-guide/loading-documents/load-password-protected-documents/load_password_protected_documents/result.docx) {{< /tab >}} {{< /tabs >}} ## Related topics - [Compare multiple password-protected documents]({{< ref "comparison/python-net/developer-guide/comparing-documents/compare-multiple-documents" >}}) — extend the same pattern to several targets.