vipulgos
Active Member
- Joined
- Aug 17, 2002
- Messages
- 335
- Office Version
- 2010
- Platform
- Windows
I am having a code which allows me to export different pages of my report, which requires to get printed in Colour Print and some pages required to print on Black and White
Code runs like this:
Now I want to merge all files which are having file name start by Col with name like to print in colour
and want to merge all files which are having file name start by B&W with name like to print in b&w
Please guide me how to do this
Code runs like this:
VBA Code:
Worksheets("Part-1").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
FileName:=Path & "Col_Part_1", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, From:=1, To:=1, OpenAfterPublish:=False
Worksheets("Part-4").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
FileName:=Path & "Col_Part_4", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, From:=1, To:=1, OpenAfterPublish:=False
Worksheets(Array("Part-1", "Part-2", "Part-3", "Decla", "Cond")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
FileName:=Path & "B&W_P2_to", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, From:=2, To:=6, OpenAfterPublish:=False
Sheets("RR").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
FileName:=Path & "B&W_RR", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, From:=1, To:=1, OpenAfterPublish:=False
Now I want to merge all files which are having file name start by Col with name like to print in colour
and want to merge all files which are having file name start by B&W with name like to print in b&w
Please guide me how to do this