|
| Re: Problem with {Print.PrinterSetup} macro |
 |
Fri, 07 Mar 2008 09:27:01 -070 |
Desmond Walsh wrote:
> Hi
> When I run the following macro
> {Print.Use "week02"}
> {Print.PrinterSetup "HP Laser Jet
> 1020","USB",1,"c:\dbase\source\w.prn",1}
> {Print.DoPrint}
>
> I get an error message - No driver for selected printer
> I have no problem using the Print menu to request printing to a file with
> the same page settings (week02) and this printer
> I have tried with a number of different HP printers on some other machines
> that I can take my printed output to. In all cases I
> can create the print file interactively, but keep getting the same error
> message with the macro
The most likely culprit: the command delimiter (in QP8) for Print.PrinterSetup
is a semicolon, not a comma. If you continue to experience problems, a simple
troubleshooting method is to first create the macro by letting QP record your
steps. This will give you the basic syntax. Then you can modify if necessary
to suit your requirements.
Cheers,
Uli
|
| Post Reply
|
| Problem with {Print.PrinterSetup} macro |
 |
Fri, 7 Mar 2008 09:46:18 -0500 |
Hi
When I run the following macro
{Print.Use
"week02"}
{Print.PrinterSetup "HP Laser Jet
1020","USB",1,"c:\dbase\source\w.prn",1}
{Print.DoPrint}
I get an error message - No driver for selected printer
I have no problem using the Print menu to request printing to a file with
the same page settings (week02) and this printer
I have tried with a number of different HP printers on some other machines
that I can take my printed output to. In all cases I
can create the print file interactively, but keep getting the same error
message with the macro
My port setting was originally LP2 but I changed it to USB since this is how
the printer is configured
I am running under XP. The problem occurs with QP12 patched to Service
Pack 2 and also with QP X3
Would appreciate hearing if anyone else is experiencing this problem or has
a workaround
|
| Post Reply
|
| Re: Problem with {Print.PrinterSetup} macro |
 |
Fri, 7 Mar 2008 15:34:57 -0500 |
Hi
Thanks for the idea of using the create macro feature. It showed me that
yes, the delimiter is ; (should have seen that from Help)
and the port is Ne01.
My macro line is a little more complicated because I am generating the
filename (w1.prn) dynamically ;
+"{PrinterSetup ""HP LaserJet
1020"";""Ne01"";1;""c:\dbase\source\w&qu
ot;&@STRING([ML]A:B178,0)&".prn"";1}"
Have to be a little careful about escaping the embedded quotes. This is now
working.
Again, thank you for prompt and perceptive comment
"Uli" <nojunkmail@spamless.com> wrote in message
news:47d16c86_3@cnews...
>
> Desmond Walsh wrote:
>> Hi
>> When I run the following macro
>> {Print.Use "week02"}
>> {Print.PrinterSetup "HP Laser Jet
>> 1020","USB",1,"c:\dbase\source\w.prn",1}
>> {Print.DoPrint}
>>
>> I get an error message - No driver for selected printer
>> I have no problem using the Print menu to request printing to a file
>> with the same page settings (week02) and this printer
>> I have tried with a number of different HP printers on some other
>> machines that I can take my printed output to. In all cases I
>> can create the print file interactively, but keep getting the same
error
>> message with the macro
>
> The most likely culprit: the command delimiter (in QP8) for
> Print.PrinterSetup is a semicolon, not a comma. If you continue to
> experience problems, a simple troubleshooting method is to first create
> the macro by letting QP record your steps. This will give you the basic
> syntax. Then you can modify if necessary to suit your requirements.
>
> Cheers,
> Uli
>
|
| Post Reply
|
|
|
|
|
|
|
|
|
|