-
Solved: Auto Email Information?
Good Day Everyone !
I will be generating Information in a specific range repetetively.
When this information is updated, there is a specific group of individuals that I need to email the changed data to.
Is there a way to setup an auto Copy/Paste Function with VBA into an Outlook Email?
Let's just say the Range I want to share is [vba]Sheets("sheet5").Range("D1:F10).Copy[/vba]
Thanks
-
Have a look at Ron de Bruin's web pages for everything you'd ever want to know about emailing with Excel VBA.
Regards
Last edited by mdmackillop; 03-03-2012 at 03:06 AM.
Reason: Link added
-
-
Can you post your final code for the benefit of others?
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
I actually used something a little different, but functional for my purpose.
The code used selects and copies the designated range to be shared via Email.
It does require some user interaction... but minimal.. three clicks and the information is on it's way.
I did find though... that if I did not go back and insert the "Application.CutCopyMode=False" command at the beginning of my macros....
I would end up with the data copied into a worksheet as the process continued.
The code may be crude... but it performs the task I require for the application.
Thanks
[vba]Private Sub CommandButton7_Click()
Application.CutCopyMode = False
'Instructions to the User in MsgBox
MsgBox "You must ""Right Click"" and ""Paste"" Into the Email Box When It Appears."
Sheets("sheet3").Select
'Data Exchange Below to Designated Cell
Sheets("sheet3").Range("h3").Value = Sheets("sheet2").Range("d3").Value
' Range required to transmit in Email
Sheets("Sheet3").Range("f2:k5").Copy
'Cell with Hyperlink Information requesting Outlook Email to Open already
'populated with Email Group Information and Subject Line. Both will be
'consistent. (mailto:EmailGroup?subject=Repetetive%20Subject)
Sheets("sheet3").range("F7").select
'Email Hyperlink Activated
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub[/vba]
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