Printing multiple copies from macro

GregoryWest

Registered User.
Local time
Today, 13:58
Joined
Apr 13, 2014
Messages
161
I have a macro that asks the user for a number then prints a report based on that number. What the end user has asked for is to print multiple copies of this report, with the ability for the user to say how many copies.

I am using the OpenReport followed by PrintOut. There is a field for copies, but how do I go about getting an input for the user to say now many copies they would like?
 
In the Print Dialog there's an option for selecting how many copies they want to print, why don't they use that?
 
The are using the runtime setup and do not have access to the code. There is also a lot of things on the PrintOut that I fill in to control the printing. Thus unfortunately have to get the number of copies as a inputted variable and supply it to the macro.
 
What code are you referring to? When you open a report in Print Preview mode there's a Print button which brings up a Print dialog.

Everything you do in the PrintOut action in a macro can be done in the Print Dialog (and more).

You do realise that this is in some way re-inventing the wheel.
In any case you can get the value from a form or an InputBox(). If you use a form you need to pass the value to a variable whose value will be returned by a function called in the PrintOut macro.
 
I understand that the print dialog box is more powerful. There in lies the problem, when the print happens it is critical that the user not be able to change which printer, forms, etc....

I am looking for the InputBox() in the macro functions but cant find it. Is it a macro function or do I call it from the macro in a different way?
 
Understood!

=InputBox("Enter number of copies: ") in the Copies textbox. Google InputBox() for an explanation and examples.
 
Something is off..... Here is what I have:
SetTempVar
Name count
Expression = InputBox("How Many Copies?")
PrintOut
Print Range Pages
Page From 1
Page To 1
Print Quality High
Copies count
Collate Copies yes
RemoveTempVar
name count

Nothing prints. The question is asked but that's it. The is code ahead that sets up the report to be printed.... If I have 'copies 1' all works fine...

Also tried:
SetTempVar
Name count
Expression = inputbox("How many copies")
RunMacro
Macro Name controllbl
Repeat Count count
RemoveTempVar
name count

Again, nothing prints. If I run the macro controllbl itself it prints one no problem. If I have a number in place of count works good also.
 
I did say to put it inside the Count textbox exactly as written in my last post.
 
BINGO Works like a charm. You are a life saver. Thanks a HUGE amount, I have been beating my head on this one for days now.
 

Users who are viewing this thread

Back
Top Bottom