Here, I have designed this receipt format. If you can just use a button to do this it would be helpful, isn't it? You wouldn't want to do the export excel to pdf over and over again. In that case, you would like to have it automated. Let's say you have to print and send receipts in Excel on a regular basis. Example: Print Excel receipt as a PDF using VBA The rest of the variables can be left as it is. You need to define it.įilename: This is the fully qualified name of pdf. Range: It can be a fixed range, a dynamic range or a selection. When your record macro while you export excel to PDF, a similar code will appear. The above code is a generic code to save a fixed range as a PDF document. IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True " C:\Users\file_name", Quality:=xlQualityStandard, _ Range.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ To save a selected range in excel (say a receipt) as PDF in Excel using VBA use below syntax.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |