MarketplaceStudioActivityProtect and Unprotect Office Files

Create your first automation in just a few minutes.Try Studio Web

Protect and Unprotect Office Files

Protect and Unprotect Office Files

by Internal Labs






back button
back button
next button
next button



This activity helps check for password protection, protect and unprotect Excel, Word and PPT files using Interop Library.



The File Protection package contains a set of 10 activities dealing with MS Word, MS Excel and MS PowerPoint.

  1. File protection check without using Interop

  2. Is Excel protected

  3. Is Word protected

  4. Is PPT protected

  5. Protect Excel File

  6. Protect Word File

  7. Protect PPT File

  8. Unprotect Excel File

  9. Unprotect Word File

  10. Unprotect PPT File

With the help of this activity, you can checkif files are protected, protect and unprotect an Excel, Word or PPT file.

9 out of 10 activities require Office 2016 or above installed on the System where this automation will run. 

Currently only unattended automation is suited for these activities. Do not use in attended environments as the activities will kill processes related to the activity/file type being worked on.

File Protection Check Without using Interop – is an activity that does not require Office 2016 to be installed as it parses the input files looking for password protection.

Note : Although this activity has been tested with the following formats (*.xls ;*.xlsx ;*.xlt ;*.xlsm ;*.xlsb ;*.pptx ;*.pptm ;*.potx ;*.ppt ;*.pot ;*.pps ;*.ppsx ;*.ppsm ;*.docx ;*.docm), this is not documented on Microsoft official documentation hence use this activity only if necessary and Office Installation is not an option.

The workflow will be blocked until the operation(s) finishes. All COM component activities related to Office automations run synchronously hence timeouts are not really useful/valid in the activity context hence it is not provided.

The activity works on ‘Windows’ type projects in UiPath. Windows Legacy is not supported.



  • File Protection check without using Interop – is fast, does not require Office installed, and also supports Legacy formats.
  • All other activities need Office 2016 or above, but use Interop API and powered by Microsoft recommended COM interaction to carry out operations.
  • Quick way to automate, protect and check for protection on common Office file types and formats.

Note: These activities only check whether a file is protected with password for viewing (for example: Excel sheets or cell protections, Word document edit or Form fields protection etc. is not detected by these activities).

Additional Information

Additional Information


Microsoft Office 2016 or above. (MS Word and/or MS Excel and/or MS PowerPoint)

Code Language

C#, Visual Basic


Windows (.Net 5.0 or higher)

Similar Listings