PrintQuality in Excel using VC++

L

lkfstephen

Dear all,

Does anyone know how the set the print quality in Excel using VC++ ?

I know in VB, it can set the PrintQuality directly. But in the VC++'s
PageSetup class, it just have one method which prototype is
VARIANT PrintQuality(const VARIANT& Index);

Can anyone tell me how to use this method? Or more precise, how to set
the parameter of this function?

Thank you very much.

Stephen Lai
 
N

NickHK

Assuming VC++ operates the same, translate what it says in Help:

Worksheets("Sheet1").PageSetup.PrintQuality = Array(240, 140)
where the first element indicates horizontal quality and the second is
vertical.

Or using the Index for the same result:
Worksheets("Sheet1").PageSetup.PrintQuality(1) = 240
Worksheets("Sheet1").PageSetup.PrintQuality(2) = 140

Assumes the printer supports vertical quality.

NickHK
 
L

lkfstephen

Hi NickHK,

Thank you for your answer. I have tried to use VB. And it works in VB.

But I don't think it is the same in VC++. In VC++, it doesn't have the
function like "setPrintQuality()". The only function provide by VC++ is

VARIANT PageSetupExcel::printQuality(const VARIANT& Index)
{
VARIANT result;
static BYTE parms[] =
VTS_VARIANT;
InvokeHelper(0x3fe, DISPATCH_METHOD, VT_VARIANT, (void*)&result,
parms,
&Index);
return result;
}

And I cannot do it like VB because we cannot assign value to a
function. Could you tell me how to use this function?

Again, thank you for your suggestion.

Stephen Lai

NickHK ¼g¹D¡G
 
N

NickHK

Stephen,
I don't use VC++, so that function does not mean much to me.
Maybe ask i a VC++ group how to get the VB arguments from that declaration.

NickHK


Hi NickHK,

Thank you for your answer. I have tried to use VB. And it works in VB.

But I don't think it is the same in VC++. In VC++, it doesn't have the
function like "setPrintQuality()". The only function provide by VC++ is

VARIANT PageSetupExcel::printQuality(const VARIANT& Index)
{
VARIANT result;
static BYTE parms[] =
VTS_VARIANT;
InvokeHelper(0x3fe, DISPATCH_METHOD, VT_VARIANT, (void*)&result,
parms,
&Index);
return result;
}

And I cannot do it like VB because we cannot assign value to a
function. Could you tell me how to use this function?

Again, thank you for your suggestion.

Stephen Lai

NickHK ¼g¹D¡G
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top