Trevor3007
Well-known Member
- Joined
- Jan 26, 2017
- Messages
- 675
- Office Version
- 365
- Platform
- Windows
hi, I currently use:-
But I want to save the filename "TimeSheet WC" (date is in cell d1) (this is for the worksheetSheets "TSheet WC 11-02-2019"). The 2nd worksheet should save with the filename "Exp WC" (date is in cell d1) (this is for the worksheet "Sheets("Expenses-Reimburse") both to as save as PDF's & in the location c:\timesheets_Expenses.
can some genius solve this for me?
MTIA & KR
Ttevor3007
Code:
Sub ToEU()'
' ToEU Macro
' send timesheet & expenses
'
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
Sheets("TSheet WC 11-02-2019").Select
Range("A1:J23").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$J$23"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Range("E16").Select
Sheets("Expenses-Reimburse").Select
Range("A1:O15").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$15"
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$15"
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.236220472440945)
.RightMargin = Application.InchesToPoints(0.236220472440945)
.TopMargin = Application.InchesToPoints(0.748031496062992)
.BottomMargin = Application.InchesToPoints(0.748031496062992)
.HeaderMargin = Application.InchesToPoints(0.31496062992126)
.FooterMargin = Application.InchesToPoints(0.31496062992126)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 70
.PrintErrors = xlPrintErrorsDisplayed
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = True
.EvenPage.LeftHeader.Text = ""
.EvenPage.CenterHeader.Text = ""
.EvenPage.RightHeader.Text = ""
.EvenPage.LeftFooter.Text = ""
.EvenPage.CenterFooter.Text = ""
.EvenPage.RightFooter.Text = ""
.FirstPage.LeftHeader.Text = ""
.FirstPage.CenterHeader.Text = ""
.FirstPage.RightHeader.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
Application.PrintCommunication = True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Range("N26").Select
End Sub
But I want to save the filename "TimeSheet WC" (date is in cell d1) (this is for the worksheetSheets "TSheet WC 11-02-2019"). The 2nd worksheet should save with the filename "Exp WC" (date is in cell d1) (this is for the worksheet "Sheets("Expenses-Reimburse") both to as save as PDF's & in the location c:\timesheets_Expenses.
can some genius solve this for me?
MTIA & KR
Ttevor3007
Last edited: