+ Reply to Thread
Results 1 to 2 of 2

VBA to password protect pdf document

Hybrid View

  1. #1
    Registered User
    Join Date
    10-30-2014
    Location
    werg
    MS-Off Ver
    erg
    Posts
    1

    VBA to password protect pdf document

    Hey all,
    I need to execute javascript from my VBA code that will password protect my PDF file. I am currently using the method below:
    AForm.Fields.ExecuteThisJavaScript password_js
    where password_js is a variable with the javascript code in it. I have executed other javascript this way (adding text to the pdf) and it works fine.
    The javascript I am trying is from http://www.evermap.com/javascriptsecurity.asp and works fine when run from within acrobat but it's not working through VBA. One thing I noticed is that when run from acrobat a save dialog pops up but through VBA nothing happens at all..

    Anyone know a simple way to do this? The password will be the same each time it is used - currently it is applied using the action wizard in acrobat but if I can run it via VBA after exporting the file to PDF it would be very nice!
    Thanks,
    Josh

  2. #2
    Registered User
    Join Date
    03-22-2015
    Location
    Plano, USA
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: VBA to password protect pdf document

    http://t.co/sFqvP1wsH4
    Try with PDFelement, Set restrictions for opening, copying, editing and printing to make your PDF files safety.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Password Protect Document Using Cell Value
    By Darth Raven in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-19-2014, 07:15 AM
  2. Macro to Password Protect my excel document PDF Format
    By lauren04 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2013, 03:03 PM
  3. Replies: 2
    Last Post: 01-17-2013, 08:39 AM
  4. VBA to Unprotect (w/ password), Unhide, Hide, and Protect (w/ password)
    By pger34 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-14-2012, 12:35 PM
  5. Replies: 2
    Last Post: 07-16-2005, 11:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1