VBA Exporting PDF from Excel in 2 copies -
i'm looking solution export couple of sheets excel 1 file pdf. i've recorded macro creates nice pdf interesting me sheets. need 2 copies of 1 of sheets in same pdf, don't know how it. here code.
sub exportpdf() sheets(array("packinglist", "administracyjny", "nadawca", "odbiorca", "przewoźnik")).select sheets("packinglist").activate chdir "c:\users\xxxxxx\desktop" activesheet.exportasfixedformat type:=xltypepdf, filename:= _ "c:\users\xxxxxx\desktop\spools_packinglist.pdf", _ quality:=xlqualitystandard, includedocproperties:=true, _ ignoreprintareas:=false, openafterpublish:= false end sub
see here copying worksheet, might workaround copy entire worksheet @ start of code, , can delete @ end (taken here):
sub sbdeleteasheet() sheet1.delete 'or can mention sheet name sheets("sheet2").delete end sub
Comments
Post a Comment