Hi,
I am wanting to save my active sheet (with print set up) as a PDF with variable & set name which does work.
but i also want it to save the PDF in the active workbook file location. Currently it just saves to my documents. help would be greatly appreciated!
Sub CLEARANCETEMPLATE_Button1_Click()
File_name = ActiveWorkbook.Name
If InStr(Filename, ".") > 0 Then
Filename = Left(Filename, InStrRev(Filename, ".") - 1)
End If
File_name = Range("C7") & " - CLEARANCE "
Destination = ThisWorkbook.Path
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=File_name, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
I am wanting to save my active sheet (with print set up) as a PDF with variable & set name which does work.
but i also want it to save the PDF in the active workbook file location. Currently it just saves to my documents. help would be greatly appreciated!
Sub CLEARANCETEMPLATE_Button1_Click()
File_name = ActiveWorkbook.Name
If InStr(Filename, ".") > 0 Then
Filename = Left(Filename, InStrRev(Filename, ".") - 1)
End If
File_name = Range("C7") & " - CLEARANCE "
Destination = ThisWorkbook.Path
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=File_name, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub