Yes. Brian de Bruin has good examples here:
http://www.rondebruin.nl/win/s7/win001.htm
The reason that I suggested the conversion to Word or Excel is because with PDF files, you have to have an editor installed such as Adobe, or possible PDFill (not sure if it has that capability). One other option is insert the PDF into a Word document as an object, and then password protect the Word document. Would that work for you?
Tim
From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf Of Saurabh Kushwaha
Sent: Saturday, July 20, 2013 5:42 AM
To: ExcelVBA@yahoogroups.com
Subject: Re: [ExcelVBA] Password protecting a file (PDF, CSV, etc)
Hi Tim,
Thanks for your reply.
Is it possible to password protect a zip file using VB code?
Why do we handle various type of other documents in VBA? Do you know how to
password protect a PDF file?
Regards
On Sat, Jul 20, 2013 at 11:34 AM, Tim Lewis <tlewis@innovativecg.com<mailto:tlewis%40innovativecg.com>> wrote:
> **
>
>
> There are a couple of options that I can think. Someone else may think of
> something else.
>
> Since the file types vary, one option is to zip them with the default
> Windows zip program.
>
> My favorite option would be to extract the information from the file, put
> it into a Word document or spreadsheet if it is data that is better suited
> that way. Then password protect and send the document or spreadsheet. The
> would require more work, because there would be different subroutines based
> on the type of document.
>
> Tim
>
> From: ExcelVBA@yahoogroups.com<mailto:ExcelVBA%40yahoogroups.com> [mailto:ExcelVBA@yahoogroups.com<mailto:ExcelVBA%40yahoogroups.com>] On
> Behalf Of Saurabh Kushwaha
> Sent: Friday, July 19, 2013 12:58 PM
> To: ExcelVBA@yahoogroups.com<mailto:ExcelVBA%40yahoogroups.com>
> Subject: [ExcelVBA] Password protecting a file (PDF, CSV, etc)
>
>
> Hi Guys,
>
> I have a problem.
>
> I have around 10-12 files at some location in my PC of various format(xlsx,
> csv, pdf, etc). I have to write a VBA code which makes all the file
> password protected and mails it to a group of people.
>
> Mailing the file is not an issue. Making xlsx file password protected is
> not an issue. How to make a file of different format (pdf, csv, etc)
> password protected using VBA code?
>
> Please help.
>
> Regards
> --
> Saurabh Kushwaha
> Corporate & Investment Banking, Barclays, Mumbai, India
> Class of 2011, NSIT, Delhi University, New Delhi, India
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>
--
Saurabh Kushwaha
Corporate & Investment Banking, Barclays, Mumbai, India
Class of 2011, NSIT, Delhi University, New Delhi, India
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (4) |
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Tidak ada komentar:
Posting Komentar