Excel VisualBasic Script

Private Sub AppEvent_WorkbookBeforePrint(ByVal Wb As Workbook,Cancel As Boolean)
    Wb.ActiveSheet.PageSetup.LeftFooter = Application.UserName
End Sub