All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.
Sub PDFEmail() 'Declare variables Dim MyFilePath As String Dim MyFileName As String Dim OutlookApp As Outlook.Application Dim MItem As Outlook.MailItem '<-- Early binding Dim EmailAddress As String Dim EmailSubject As String Dim Msg As String Application.ScreenUpdating = False 'Activate the Transaction Form worksheet 'Worksheets("Transaction Form").Activate 'Specify email address, email subject, and a brief message EmailAddress = "Angela.XXXX@XXXXXXX.com" EmailSubject = "Please see attached email" Msg = Range("A2") 'Build parts of name of PDF file MyFilePath = ThisWorkbook.Path & "C:\Users\matthane\Documents\OLD_ECOM_DATA\Missing" MyFileName = ActiveSheet.Name 'Save Transaction Form as PDF file in same directory as this 'Excel workbook ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ MyFilePath & MyFileName, Quality:=xlQualityStandard, _ IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _ False 'Create Outlook object Set OutlookApp = New Outlook.Application 'Send out the email Set MItem = OutlookApp.CreateItem(olMailItem) With MItem .To = EmailAddress .Subject = EmailSubject .Body = Msg .Attachments.Add MyFilePath & MyFileName & ".PDF" .Send End With 'House cleaning Set OutlookApp = Nothing MsgBox "Email has been sent. BTW Your coffee and danish are waiting downstairs." Application.ScreenUpdating = True End Sub
|Excel writer in php that allows file save, NOT download||3||24|
|IF OR formula Excel - multiple conditions||9||39|
|VBA: fill range dynamically based on a config sheet||6||25|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
20 Experts available now in Live!