Skip to main content
New Participant
December 20, 2012
Question

How to print password protected PDF files to a new PDF using Visual Basic for Applications

  • December 20, 2012
  • 1 reply
  • 25820 views

I have a series of PDF files that are password protected. I have a login ID and password that allows me to view the documents once I've logged in, but my co-workers that don't have login credentials cannot view the documents. What I'm doing in order to make the documents viewable for others is a manual process that I'm looking to automate using Microsoft Access 2003 VBA. Here's the manual process:

1.) I set my default printer to be the "Adobe PDF" printer.

2.) I open Windows Explorer and navigate to the folder that contains the password-protected PDF files, selecting all of them.

3.) I right-click on the selected group of files and choose "Print" from the context sensitive menu that appears.

4.) I provide my ID and password in order to access the password-protected files - I only have to do this once.

5.) In the "Save PDF File As" dialog box that appears, I choose where I want to save the first file and the applicable file name and click "OK".

6.) I repeat Step 5 until all of the PDF files have been printed as "new" PDF files with new names that are no longer password protected.

I know how, using Microsoft Access 2003 VBA, to navigate to a particular folder on a network drive and loop through each file within the folder. What I don't know how to do is to print each individual PDF file using the Adobe PDF printer so that it's printed as a new PDF file that's no longer password protected.

This topic has been closed for replies.

1 reply

Brainiac
December 20, 2012

(Sorry, I think my reply was useless to you. This is not a PDF password, but an external password. Is that right?)

JDGUILTYAuthor
New Participant
December 20, 2012

You are correct - the password is an external password. When I go to open one of the PDF files that are pasword protected I'm greeted with a dialog box (the dialog box displays "Login In To Restricted Document" in the title bar), which is where I provide my user name and password as part of the Adobe LiveCycle Right Management credentials.

Brainiac
December 20, 2012

Hmm. I think that may be halfway between a regular PDF password (which you would have to give for each file) and an external password (which was done by the OS).

I think your best bet is to talk to your site security administrator about adding LiveCycle Rights Management access to the other members of your work group. Working around company security, even if it is possible, can lead to very deep waters... such as them blocking printing of all future files to protect them...