Hi All,
I use the following (part of the) VBA code to define the name of the pdf file i'm exporting.
' Define PDF filename
PdfFile = ActiveWorkbook.FullName
i = InStrRev(PdfFile, ".")
If i > 1 Then PdfFile = Left(PdfFile, i - 1)
PdfFile = PdfFile & "_" & ActiveSheet.Range("N11") & "_" & ActiveSheet.Range("R16") & "_" & ActiveSheet.Range("AB1") & ".pdf"
' Export activesheet as PDF
With ActiveSheet
.ExportAsFixedFormat Type:=xlTypePDF, Filename:=PdfFile, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End With
I want to remove the code that uses the filename of the excelfile and use a generic name instead (for example: "Orderconfirmation" & "_" & ActiveSheet.Range("N11") etc etc. )
Is there a way to do this?
Thanks!
Bookmarks