VBA code to save as PDF with password (2 Viewers)

shrav

New member
Local time
Today, 04:42
Joined
Oct 21, 2017
Messages
5
Can someone suggest on the above please?


Sent from my iPhone using Tapatalk
 

shrav

New member
Local time
Today, 04:42
Joined
Oct 21, 2017
Messages
5
Hi CJ,

Thanks for your reply.

I am trying to protect pdf without using third party...
Anyhow please share if anyone have code or comments for that?


Sent from my iPhone using Tapatalk
 

CJ_London

Super Moderator
Staff member
Local time
Today, 05:42
Joined
Feb 19, 2013
Messages
16,607
I am trying to protect pdf without using third party
...
Anyhow please share if anyone have code or comments for that?

simply - it can't be done, you will need third party software
 

isladogs

MVP / VIP
Local time
Today, 05:42
Joined
Jan 14, 2017
Messages
18,209
simply - it can't be done, you will need third party software

Depends whether you are trying to protect an existing PDF or a new PDF.

The free Acrobat Reader will not password protect existing PDFs ... unless you pay a monthly fee ($13-15 per month!)

For a newly created PDF:
It can't be done from Access
However, it can be done from Word.

Before saving a Word doc as a PDF, click Options.
Then select 'Encrypt this document with a password'
Enter a password between 6 and 32 characters.
Job done!

This method does provide an indirect way of protecting existing PDFs
Open the PDF in Word (2016).
Now Save As ... and enter a new file name.
Add a password as before.

NOTE: Opening a PDF in Word 2016 is usually fine but may not give perfect results if the document is very complex.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:42
Joined
May 7, 2009
Messages
19,231
just crossed my mind.
what does the OP means when she/he
said Password Protect.
most password protected pdfs can
be opened. but only their contents
are protected from copying and alteration.
they can be printed too.
none did i see a pop-up dialog asking
for a password.
 

isladogs

MVP / VIP
Local time
Today, 05:42
Joined
Jan 14, 2017
Messages
18,209
If you follow the method I outlined from Word, you will be prompted for the password when you open the PDF you created

That's what I assumed the OP meant
 
Last edited:

Users who are viewing this thread

Top Bottom