Hi All

I am extremely new to macros and formulas etc. This is the first Macro i have ever tried and certainly will not be my last.

I wanted to have a invoice number generated and saved. What I found is a easy method on the net and works fine.

My problem is that i would like to save the file as a pdf document and not a excel document. Is this possible by changing some things in the below code.

Sub SaveInvWithNewName()
Dim NewFN As Variant
' Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "C:\aaa\Inv" & Range("E5").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
Nextinvoice
End Sub


Thanking you in advance.