Hi,
Firstly, my knowledge of coding is basic at best....i've looked on various pages to find a solution and concluded the below. However, whilst everything works perfectly, unfortunately i cannot seem to get the file to save to the correct folder. I keeps saving to my documents!!
Sub CentreSoft()
pdfName = ActiveSheet.Range("X20")
ChDir "Z:\Centresoft\Coding Forms PDF\Centresoft"
fileSaveName = ActiveSheet.Range("X20")
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fileSaveName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
MsgBox "PDF File Saved Correctly"
End Sub
If you could add a bit of code to print the pdf after the save (or excel doc prior to saving), that would be amazing too.
Please help!!!!
Many thanks
Firstly, my knowledge of coding is basic at best....i've looked on various pages to find a solution and concluded the below. However, whilst everything works perfectly, unfortunately i cannot seem to get the file to save to the correct folder. I keeps saving to my documents!!
Sub CentreSoft()
pdfName = ActiveSheet.Range("X20")
ChDir "Z:\Centresoft\Coding Forms PDF\Centresoft"
fileSaveName = ActiveSheet.Range("X20")
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fileSaveName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
MsgBox "PDF File Saved Correctly"
End Sub
If you could add a bit of code to print the pdf after the save (or excel doc prior to saving), that would be amazing too.
Please help!!!!
Many thanks