Where would I place the email address in the macro below.
It attaches the workbook but I want it to enter the email address to send it to.
Sub email()
'
' email Macro
' Macro recorded 2/26/2010 by stans'
' Keyboard Shortcut: Ctrl+e
'
Application.Dialogs(xlDialogSendMail).Show
End Sub
email from workbook
-
- Administrator
- Posts: 80237
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: email from workbook
Try this:
Application.Dialogs(xlDialogSendMail).Show Arg1:="someone@company.com"
You can also specify the subject:
Application.Dialogs(xlDialogSendMail).Show Arg1:="someone@company.com", Arg2:="Monthly Report"
Application.Dialogs(xlDialogSendMail).Show Arg1:="someone@company.com"
You can also specify the subject:
Application.Dialogs(xlDialogSendMail).Show Arg1:="someone@company.com", Arg2:="Monthly Report"
Best wishes,
Hans
Hans
-
- Lounger
- Posts: 38
- Joined: 26 Feb 2010, 14:01
Re: email from workbook
That'll do it--- glad you included the subject line---Thanks