Hey guys I'm trying to create a macro that prints pdfs. I have the PDF creation down the problem i am having is the file path location along with creating the file name based on the sheet name. I believe my coding for the file path is off. Maybe the quotations are misplaced. Ultimately this will be in a loop but I'll put that in once I get the file location situation fixed.
Sub PrintCoverSheets()
'
' PrintCoverSheets
'
'
fName = Replace(ActiveSheet.Name, " ", "")
ActiveSheet.ExportAsFixedFormat xlTypePDF, ThisWorkbook.Path "\" & " fName" & " cover", xlQualityStandard, , , , , False
Selection.EntireColumn.Hidden = False
End Sub
replace:
ThisWorkbook.Path "\"
with
ThisWorkbook.Path & "\"