Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2012, 07:33 PM
Registered User
 
Join Date: Feb 2012
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default VBA to pwd protect a spreadsheet then email it?

Hi,

Is there a way in VBA to email a spreadsheet as password protected? This is what I want to do:

1. Open a new spreadsheet and populate it.
2. Email it with Microsoft Outlook (spreadsheet has to be pwd protected).

Then is there a way to delete the spreadsheet after it is sent? For security reasons, we don't want a saved version to be hanging around. This entire process will be automated, and nobody will be monitoring it daily to delete the spreadsheets.

Thanks,
Janice Suzuki
 
Old February 29th, 2012, 10:25 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

Since you are going to send the entire sheet you can try SendMail in Excel (ActiveWorkbook.SendMail)

Else you can go for Outlook VBA (http://vbadud.blogspot.in/2007/04/vb...-vba-mail.html)

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to protect VBA code IranianCuriousBoy Word VBA 5 September 6th, 2009 09:40 AM
Protect / Unprotect Excel 97 - VBA Code - jlpazv Excel VBA 2 November 30th, 2007 10:54 AM
Email Attachment from VBA echovue Access 12 December 27th, 2006 05:51 PM
Automatically attach Excel spreadsheet to Email nbaj2k Excel VBA 3 August 1st, 2006 12:15 PM
Open access database with pwd saikrishnan Pro VB Databases 1 October 9th, 2005 10:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.