Send accompanying book (macro excel vba)
Option Explicit 'Through this code excel vba example we can send the email
active workbook 'sgte what you could do is create a button on the ribbon or a button on an Excel bar
' and from that button to directly send a book or a sheet
'Macro send the active workbook Sub
Prc_SendTheActiveWorkbook ()
ActiveWorkbook.SendMail Recipients: = "EXCELVBASAMPLE@Sample.com" Subject: = "EXCELVBASAMPLE" End Sub
'Send only first page as an attachment
Sub prc_Send_one_Sheet_From_ActiveWorkbook ()
ActiveWorkbook.Sheets (1).
Copy With ActiveWorkbook
. SendMail Recipients: = "EXCELVBASAMPLE@Sample.com" Subject: = "SAMPLE EXCEL VBA"
. Close SaveChanges: =
False End With End Sub
0 comments:
Post a Comment