|
-
Apr 6th, 2006, 01:15 PM
#1
Thread Starter
New Member
Excel "Save_Send" Macro
I've a VB macro linked to a graphic in a spreadsheet that currently has the following attached to it.
Sub Save_Send()
'
' Save_Send Macro
' Saves this form and attaches it to an email.
'
' The question is "How do I code it so that it
' populates the 'To:" address and the Subject line?".
'
ActiveWorkbook.Save
Application.Dialogs(xlDialogSendMail).Show
End Sub
This works well to create an email with the saved spreadsheet attached. Since this spreadsheet will always be sent to the same email address is there a way to code a static address (and maybe a static subject line) into the resulting email?
-
Apr 6th, 2006, 01:33 PM
#2
Re: Excel "Save_Send" Macro
You don't need to show the dialog, you can just send the workbook.
VB Code:
Sub Save_Send()
ActiveWorkbook.Save
ActiveWorkbook.SendMail Recipients:=" [email protected]", Subject:="This is your subject"
End Sub
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Apr 6th, 2006, 01:40 PM
#3
Thread Starter
New Member
Re: Excel "Save_Send" Macro
Man...THANKS!
I tried getting assistance from some VB guys here at work and they moaned and groaned about how hard it would be. Now I know they just didn't want to help out. Thanks again, I really appreciate it.
-
Apr 6th, 2006, 01:58 PM
#4
Re: Excel "Save_Send" Macro
Not a problem, just glad to help.
BTW welcome to the Forums
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Apr 6th, 2006, 02:16 PM
#5
Thread Starter
New Member
Re: Excel "Save_Send" Macro
Thanks for the 'welcome'. As you might have guessed my VB experience doesn't even make me a newbie. I'm attempting to talk my employer into some formal traning in VB, Jscript, ASP, HTML and XML. I think I've finally found someone who's willing to approve it. It's only been about 3 years of pleading. Wish me luck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|