Hi John,
Thank you for the response. Based on your clarification, I would recommend trying this macro script to achieve your need:
Sub SubmitPayroll()
Dim OutlookApp As Object
Dim OutlookMail As Object
Dim FilePath As String
' Activate the Timesheet worksheet
ThisWorkbook.Sheets("Timesheet").Activate
' Save the workbook with the Timesheet sheet active
ThisWorkbook.Save
FilePath = ThisWorkbook.FullName
' Create Outlook email
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
With OutlookMail
.To = "******@yourcompany.com" ' Replace with actual email
.Subject = "Payroll Submission"
.Body = "Attached is the latest payroll spreadsheet."
.Attachments.Add FilePath
.Display ' Use .Send to send immediately
End With
' Clean up
Set OutlookMail = Nothing
Set OutlookApp = Nothing
End Sub
If you have any questions or concerns trying the steps above, please don’t hesitate to ask, I'm here to help. Looking forward to your response.
Best regards,
Jay-Tr– MSFT | Microsoft Community Support Specialist