Save as excel file with password

P

PayeDoc

Hello All

I have a macro with two commands: OutputTo and SendObject. The SendObject
emails the file that was created with the OutputTo, but the reason for the
seperate commands is that the excel file must be password-protected prior to
being sent. The user gets the opportunity of doing this before the file is
emailed, because the SendObject command does not have the object type or
name specified, so the macro pauses with the file open (on the taskbar) and
Outlook Express open ready for the file to be attached: at that point the
user clicks on the excel file on the taskbar, saves it with the password,
then attaches it to the email and send it.

Obviously this would all be much easier if I could get the macro to save the
excel with the password. I use Call ClipBoard_SetData to put the password on
the clipboard, but is there any way to do the save-with-password as part of
the macro ... or with VBA?

Hope someone can help.

Many thnaks in advance.
Leslie Isaacs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top