# Excel export to PDF VBA original file name



## RaudMees (Jan 1, 2023)

Hello

I've looked few days how to make one simple code and no luck. As I am writing here, then I like to ask a bit more better code. 
1) I have Excel file name 0047-5-customer.xlsm and several sheets inside, 2 of them named bom/fittings. I like to get PDF files with name 0047-5-customer-bom.pdf and 0047-5-customer-fittings.pdf. If needed, I can add this original file name into some cell, but this is plan B. PDF files will be in same folder where is original file. 

2) Same as point 1, but fittings PDF file will be attached into e-mail (Outlook) and ready to send. Subject line: Order 0047-5-customer-fittings
If it's possible... 

In Excel I will make 2 buttons for points 1 and 2, so 2 different commands. 

Thanks in advance!
RM


----------

