Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

PrintQuality in Excel using VC++

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lkfstephen@gmail.com - 22 Jan 2007 18:45 GMT
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
NickHK - 23 Jan 2007 02:40 GMT
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

> Dear all,
>
[quoted text clipped - 10 lines]
>
> Stephen Lai
lkfstephen@gmail.com - 23 Jan 2007 18:13 GMT
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 寫道:

> Assuming VC++ operates the same, translate what it says in Help:
>
[quoted text clipped - 24 lines]
> >
> > Stephen Lai
NickHK - 24 Jan 2007 01:46 GMT
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

> Assuming VC++ operates the same, translate what it says in Help:
>
[quoted text clipped - 26 lines]
> >
> > Stephen Lai
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.