hedgeselect
asked on
Easy VB task - password add to PDF file in Outlook
Points awarded to anyone who can tell me how I can automate a task (maybe through Excel VB button in Outlook?) which adds a predefined password to an email which has a PDF attachment to it?
The rationale behind this, is that I receive regular PDFs, which I need to add a password to and then send to another department. I am trying to avoid the need to save the file, open, add password via my Acrobat writer, save and then attach to email again.
Anyone who can write me a VB script to do this will be award the points. Thanks.
The rationale behind this, is that I receive regular PDFs, which I need to add a password to and then send to another department. I am trying to avoid the need to save the file, open, add password via my Acrobat writer, save and then attach to email again.
Anyone who can write me a VB script to do this will be award the points. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>>>My guess by the lack of responses here, is that it cannot be done easily.
Yes you are right. It is not that easy. Impossible... No. Just time consuming and lots of code.
The easiest is Logic 1 mentioned above. Do you think that would help?
Sid
Yes you are right. It is not that easy. Impossible... No. Just time consuming and lots of code.
The easiest is Logic 1 mentioned above. Do you think that would help?
Sid
ASKER
Does logic 1 relate to that code you pasted above? What does that code do?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What do you think about using SendKeys as part of the process to set passwords?
Dave
Dave
ASKER
im going to drop the question, no easy solution. thx anyway.
Not sure what sendkeys is.
Not sure what sendkeys is.
SendKeys uses keystrokes to do things that there are no methods built around.
For example, to set passwords in the VBA Project Editor, one would need sendkeys to deliver the password in the right "box".
So, theoretically, one could focus on the PDF and "Send" the keys to get the right menu up for password protection and then "Send" in the password.
Doable
Dave
For example, to set passwords in the VBA Project Editor, one would need sendkeys to deliver the password in the right "box".
So, theoretically, one could focus on the PDF and "Send" the keys to get the right menu up for password protection and then "Send" in the password.
Doable
Dave
ASKER
does sendkeys require software?
SendKeys can be called from VBA - no additional software other than what you already have.
There are SOME applications that won't take SendKeys from VBA (e.g., like RDP - Remote Desktop), so a quick test against PDF would testify whether this route is worth further exploration.
To see how "easy" it is from VBA - here's a related link using sendkeys to PDF (but not the password): https://www.experts-exchange.com/questions/22095210/SendKeys-From-Excel-VBA-to-Acrobat.html
Dave
To see how "easy" it is from VBA - here's a related link using sendkeys to PDF (but not the password): https://www.experts-exchange.com/questions/22095210/SendKeys-From-Excel-VBA-to-Acrobat.html
Dave
ASKER
Sorry for the delay. I'm not a programmer so I wont know how to implement the above. My guess by the lack of responses here, is that it cannot be done easily.