The code below, converts an excel file to a PDF file. The problem I'm having is the PDF file is saved in "My Documents". I would like to save the PDF in a folder named "Temp_PDF" using existing file name of the document.
Sub CopyPDF()
Dim ws As Worksheet
Dim Fname As String
For Each ws In ActiveWorkbook.Worksheets
On Error Resume Next
Fname = ws.Name
ws.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=Fname, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False
Next ws
End Sub
Can anyone assist me with code to save the file in a folder "Temp_PDF".
Any assistance would be appreciated.
Thanks