excel - Select range from multiple sheet and export to a single pdf -


i read solution combine sheets 1 pdf post:

thisworkbook.sheets(array("sheet1", "sheet2")).select  activesheet.exportasfixedformat type:=xltypepdf, filename:= _ "c:\tempo.pdf", quality:= xlqualitystandard, includedocproperties:=true, _  ignoreprintareas:=false, openafterpublish:=true 

however me prints out whole sheet. how select ranges print each sheet when combining multiple sheets.

i can if export each sheet single pdf each not sure how if combine them.

many in advance

this possible creating sheets array , navigating through each sheet select desired ranges. once done use selection.exportasfixedformat type:=xltypepdf generate pdf

sub test() sample code:

sub test()  sheets(array("a", "b")).select  sheets("a").activate  range("a1:j32").select  sheets("b").activate  range("a6:j37").select  selection.exportasfixedformat type:=xltypepdf, _  filename:=activeworkbook.path & "\test.pdf", _  quality:=xlqualitystandard, includedocproperties:=true, ignoreprintareas:=false, openafterpublish:=true end sub 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -