Link to send file to an e-mail address
How do I create a link within a workbook to send that workbook to an
indicated email address? Thanks. |
PJ,
The following code will create an Outlook MailItem with the current workbook as the attachment Set myOlApp = CreateObject("Outlook.Application") 'Dim myOlApp As New Outlook.Application Set myitem = myOlApp.CreateItem(olMailItem) myitem.Display myitem.Recipients.Add Sheet1.Range("a2").Value myitem.Attachments.Add ThisWorkbook.Path & "\" & ThisWorkbook.Name http://HelpExcel.com "-PJ" wrote: How do I create a link within a workbook to send that workbook to an indicated email address? Thanks. |
Thanks galimi. Unfortunately I'm not very good with the advanced part of
Excel so I'm not really sure where I should be entering this information. Also, my work only allows me access to certain sites and http://helpexcel.com is not one of them. Can you please elaborate on your response? Thanks! -PJ "galimi" wrote: PJ, The following code will create an Outlook MailItem with the current workbook as the attachment Set myOlApp = CreateObject("Outlook.Application") 'Dim myOlApp As New Outlook.Application Set myitem = myOlApp.CreateItem(olMailItem) myitem.Display myitem.Recipients.Add Sheet1.Range("a2").Value myitem.Attachments.Add ThisWorkbook.Path & "\" & ThisWorkbook.Name http://HelpExcel.com "-PJ" wrote: How do I create a link within a workbook to send that workbook to an indicated email address? Thanks. |
I will post an example to http://www.Galimi.com/Examples by tomorrow
"-PJ" wrote: Thanks galimi. Unfortunately I'm not very good with the advanced part of Excel so I'm not really sure where I should be entering this information. Also, my work only allows me access to certain sites and http://helpexcel.com is not one of them. Can you please elaborate on your response? Thanks! -PJ "galimi" wrote: PJ, The following code will create an Outlook MailItem with the current workbook as the attachment Set myOlApp = CreateObject("Outlook.Application") 'Dim myOlApp As New Outlook.Application Set myitem = myOlApp.CreateItem(olMailItem) myitem.Display myitem.Recipients.Add Sheet1.Range("a2").Value myitem.Attachments.Add ThisWorkbook.Path & "\" & ThisWorkbook.Name http://HelpExcel.com "-PJ" wrote: How do I create a link within a workbook to send that workbook to an indicated email address? Thanks. |
All times are GMT +1. The time now is 03:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com