Staple reports

toleafs

Active Member
Joined
Jun 27, 2005
Messages
498
Hello
I have the following code that collates 2 differet reports:

Function CollateReports2(Rpt1 As String, Rpt2 As String)

Dim MyPageNum As Long, _
NumPages As Long

NumPages = PageCount(Rpt1)

'Set the page number loop and alternate printing the report pages.
For MyPageNum = 1 To NumPages
'NumPages is the number of pages to print.
DoCmd.SelectObject acReport, Rpt1, True
DoCmd.PrintOut acPages, MyPageNum, MyPageNum
DoCmd.SelectObject acReport, Rpt2, True
DoCmd.PrintOut acPages, MyPageNum, MyPageNum
Next MyPageNum

End Function

Is there a way to tweak this so that the 2 reports are also stapled?
Thanks in advance for your help
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I really don't think so - wouldn't that be some sort of printer setting?

Or am I misunderstanding what you mean by 'stapled'.:)
 
Upvote 0
I really don't know any direct way to set a printer from VBA.

It's probably possible with a whole load of API code but IMO it wouldn't be worth the hassle.:)
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top