When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
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