Hello again guys!
I'm either overthinking this, or not fully grasping the concept. I'm trying to save a file as PDF (with a file name from a cell value) to the same directory, but for whatever reason, it keeps saving the PDF's to one directory above.
This way, if my Excel file is in C:\Users\PCName\Desktop\test\test2 folder, the PDF is being saved to C:\Users\PCName\Desktop\test instead.
So what am I missing? How do I force the PDF file to be saved in the same directory, in this case: C:\Users\PCName\Desktop\test\test2
I'm either overthinking this, or not fully grasping the concept. I'm trying to save a file as PDF (with a file name from a cell value) to the same directory, but for whatever reason, it keeps saving the PDF's to one directory above.
Code:
[FONT=Arial]s = Range("B2").Value[/FONT][FONT=Arial]
[/FONT]
[FONT=Arial] ActiveSheet.<wbr>ExportAsFixedFormat Type:=xlTypePDF, Filename:= _[/FONT]
[FONT=Arial] ThisWorkbook.Path & s, Quality:=xlQualityStandard, IncludeDocProperties _[/FONT]
[FONT=Arial] :=True, IgnorePrintAreas:=False, OpenAfterPublish:=True[/FONT]
This way, if my Excel file is in C:\Users\PCName\Desktop\test\test2 folder, the PDF is being saved to C:\Users\PCName\Desktop\test instead.
So what am I missing? How do I force the PDF file to be saved in the same directory, in this case: C:\Users\PCName\Desktop\test\test2