I have a macro which saves a file as a pdf., but would like to adjust it to include the current date in the filename. The code is below.
Sub SaveAsAuto()
Application.ScreenUpdating = False
Sheets("Primary Bank").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"R:\" & Range("M69") & "Branch NNN Proofsheet MMDDYY", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Sheets(Array("Primary Bank", "Secondary Bank")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"R:\" & Sheets("Primary Bank").Range("M69") & "Branch NNN Proofsheet MMDDYY", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Sheets("Primary Bank").Select
End Sub
Sub SaveAsAuto()
Application.ScreenUpdating = False
Sheets("Primary Bank").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"R:\" & Range("M69") & "Branch NNN Proofsheet MMDDYY", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Sheets(Array("Primary Bank", "Secondary Bank")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"R:\" & Sheets("Primary Bank").Range("M69") & "Branch NNN Proofsheet MMDDYY", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Sheets("Primary Bank").Select
End Sub