I have the following code in the This Workbook - BeforePrint. It prints the username in the right header.
It works create if the user prints out their Excel spreadsheet and then delivers it to another department.
However, we want to email the spreadsheet to another department, but have the original author's name still appear in the header when it prints. The way it is set up now the recipient's name will print in the header when they open the file and print the output.
Does anyone have a solution? I know any email would indicate who the file came from, but I want this information on the printed output as well.
TIA
Dim ws As Worksheet
For Each ws In Worksheets
ws.PageSetup.RightHeader = "&7" & Application.UserName
Next ws
End Sub
It works create if the user prints out their Excel spreadsheet and then delivers it to another department.
However, we want to email the spreadsheet to another department, but have the original author's name still appear in the header when it prints. The way it is set up now the recipient's name will print in the header when they open the file and print the output.
Does anyone have a solution? I know any email would indicate who the file came from, but I want this information on the printed output as well.
TIA
Dim ws As Worksheet
For Each ws In Worksheets
ws.PageSetup.RightHeader = "&7" & Application.UserName
Next ws
End Sub