excel-training-advanced courses - macro automate emailing spreadsh
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » excel-training-advanced courses - Macro to automate e-mailing of spreadsheet

excel-training-advanced courses - Macro to automate e-mailing of spreadsheet

The UK's most regular instructor-led training courses.
Training information: excel-training-advanced courses · Advanced.excel · Microsoft Excel Training London
See also · excel-courses-london · excel courses in london · excel microsoft training

resolvedResolved · Low Priority · Version Standard

Macro to automate e-mailing of spreadsheet

Kevin has attended:
Excel Advanced course
Excel VBA course

by - delegate Kevin [2 posts] (2007 Dec 19 Wed, 17:03) replyReply

I want to add a button within a spreadsheet which will open outlook and attach the completed spreadsheet. how do I do that?

Excel Advanced 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003 2008 Dec 5 Fri Bayswater 0 FULL    
2002/XP 2008 Dec 10 Wed Tooting 0 FULL    
2003 2008 Dec 10 Wed Bloomsbury 0 FULL    
2007 2008 Dec 10 Wed Bloomsbury 2 book now £240 £245
2003 2008 Dec 12 Fri Southwark 4 book now £224 £235
2003 2008 Dec 17 Wed Southwark 1 book now £235 £240
Full Schedule: See all 95 Excel Advanced course dates.
Bookings currently available until 24th November 2009.

RE: Macro to automate e-mailing of spreadsheet

by - trainer Stephen gold contributer[386 posts] (2008 Jan 4 Fri, 12:33) replyReply

Hi Kevin

Thankyou for your question

If you create you button on the tool bar and set it to run the following code, you should find it works OK, although we my need to tweak it further to meet your specific requirements.

In particular the recipient and subject are hard coded and you might want to repalce them with variables so the user can define them at run time

Public Sub sendemail()

Dim Outlook As Object
Dim NameSpace As Object
Dim MailItem As Object
Dim recipient As String

recipient = "bob@acompany.com"

Set Outlook = CreateObject("Outlook.Application")
Set MailItem = Outlook.Createitem(0)

With MailItem
.Subject = " Test Email"
.Recipients.Add recipient
.body = "Workbook"
.send
End With

End Sub


Related articles

· 3 Reasons Why Excel Training Courses For Employees Can Improve Your Business
· Improve Performance Of Your Excel Macros
· How to Create Better Excel Spreadsheets: Part Four
· How to Create Better Excel Spreadsheets: Part One
· Customized Financial Excel Courses in London

Excel tip:

Editing Formulas in Excel Cells

Although people like to edit a formula in the Formula bar, you can also edit a formula in the cell.

To do this select the cell and press "F2". This puts Excel into Edit mode, and you can move around in the cell and make any necessary changes.

Double-clicking the cell also puts Excel in Edit mode.

View all Excel hints and tips

Rate this page:
4.0/5 (3 votes cast)
Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz