frankortizmachalert
New Member
- Joined
- Jul 11, 2023
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
I am using the following code and works as expected but when it creates the PDF and opens the save location is 'Documents' but I want it to save to same folder location that the open worksheet is from.
Sub print_shipping_tabs()
'
' print_shipping_tabs Macro
' Prints the Shipping Tabs Only
'
'
Sheets(Array("Shipping", "Shipping (CO1)", "Shipping (CO2)", "Shipping (CO3)", "Shipping (CO4)", "Shipping (CO5)", "Shipping (CO6)", "Shipping (CO7)", "Shipping (CO8)", "Shipping (CO9)")).Select
Sheets("Shipping").Activate
'Save Active Sheet(s) as PDF
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Worksheets("Job Notice").Range("S1"), Quality:=xlQualityStandard, _
IncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish:=True
Sheets("Job Notice").Activate
End Sub
Sub print_shipping_tabs()
'
' print_shipping_tabs Macro
' Prints the Shipping Tabs Only
'
'
Sheets(Array("Shipping", "Shipping (CO1)", "Shipping (CO2)", "Shipping (CO3)", "Shipping (CO4)", "Shipping (CO5)", "Shipping (CO6)", "Shipping (CO7)", "Shipping (CO8)", "Shipping (CO9)")).Select
Sheets("Shipping").Activate
'Save Active Sheet(s) as PDF
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Worksheets("Job Notice").Range("S1"), Quality:=xlQualityStandard, _
IncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish:=True
Sheets("Job Notice").Activate
End Sub