Blue Prism Product

last person joined: yesterday 

Chat about Blue Prism products
Expand all | Collapse all

MS Word VBO - ExportPDF - How to set password during export

Jump to Best Answer
  • 1.  MS Word VBO - ExportPDF - How to set password during export

    Posted 10-27-2018 12:55
    Hi,  While exporting doc to pdf, i need to password protect pdf. Any help is well appreciated. Thanks.


  • 2.  RE: MS Word VBO - ExportPDF - How to set password during export
    Best Answer

    Posted 08-13-2020 18:25
    Hi Manish,

    You can use Utility - PDF to set password on pdf.

    Here is the link to the Utility.
    https://digitalexchange.blueprism.com/dx/entry/58413/solution/utility---pdf

    Cheers,

    ------------------------------
    In Joe Khor
    Sr. Product Consultant
    Blue Prism
    ------------------------------



  • 3.  RE: MS Word VBO - ExportPDF - How to set password during export

    Posted 08-28-2020 22:47
    Hey Manish,

    Are you using the Word VBO to export to PDF? If so, I am afraid there is no way to password protect the PDF. Office's Object Model does not support encrypting PDF on export that can be called leveraged in the VBO, as can be seen at https://docs.microsoft.com/en-us/office/vba/api/word.document.exportasfixedformat.

    Since yours is a specific use case, I'll suggest spying all necessary elements of the Word application and then using them as part of your automation to specify Encrypt options and the password.
    The process is File > Save As > More Options... > Save as type: PDF (*.pdf) > Options... > Encrypt the document with a password > OK > Enter password > Re-enter password > OK > Save

    I tried spying the elements and was successfully able to do so using UI Automation and Accessibility modes. I will suggest Accessibility mode as I found it to work better.

    Hope this helps.

    Regards.

    ------------------------------
    Madhur Chopra
    Sr. Product Consultant
    Blue Prism - Professional Services
    America/Los_Angeles
    ------------------------------



Share