Hi guys,
I am having an issue with exporting pdf’s from within excel. I have spent the day looking at the old solutions for this problem on the forum but I cannot make any progress with it. I am hoping some new eyes will help me out.
The export of the pdf file works perfectly before compile but after compile the export fails in that the process does not get to complete, ie, the little round spinning circle continues indefinitely.
In the location where the pdf file is meant to go there is only a mso.tmp file. I am assuming this is standard until the actual pdf file gets placed in the folder. the VBA code i am using to complete the export is below.
ActiveSheet.Select
FileName8 = "DR. " & ActiveSheet.Range(“by7”) & ActiveSheet.Range(“cb4”) & " " & ActiveSheet.Range(“ca3”) & " - " & ActiveSheet.Range(“cb6”) & " - " & ActiveSheet.Range(“j4”) & " - " & ActiveSheet.Range(“j3”) & " - " & ActiveSheet.Range(“j2”) & " - " & Format(Now, “yyyy-mm-dd hh-mm-ss”)
ChDir9 = Sheet367.Range(“ax289”).Value & "" & Sheet110.Range(“h30”) & "" & ActiveSheet.Range(“bx7”) & ""
ActiveSheet.Range("ca1:cl7").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ChDir9 & FileName8 & ".pdf", Quality:=xlQualityStandard, _
includedocproperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Again I have tried the solution on two other posts I found but and I am getting nowhere.
I am using the latest version 2022.1
thanks for having a look