password protect excel spreadsheet through access macro

  • Thread starter Thread starter MM
  • Start date Start date
M

MM

Hi all,

I'm looking for a way to password protect the excel spreadsheets currently
created in a send object macro w/i access.

Currently, I use a macro to open a report based on a query filter. Then I
use send object to send the report in excel via email.

I'm looking for an automated way to password protect the excel files before
sending them.

Thanks!
 
You won't be able to do this in one step through SendObject. You'll have to
create the excel file (through OutputTo for example), then use the Excel
object model to access the document and change it's properties, then send
the file as an attachment (through the outlook O.M. most likely). The other
option you could do if it fits your scenario is publish the documents to a
password protected share or shares and allow access to them that way.
 
Back
Top