2.2.4.46.79 Worksheet::SetPrintArea

Description

Use to set printing area. Pass NULL to clear existing printing area.

Syntax

BOOL SetPrintArea( const ORANGE * pRange )

Parameters

pRange
[input] set printing area, if NULL to clear printing area

Return

TRUE for success

Examples

EX1

BOOL Worksheet_SetPrintArea_Ex1(const ORANGE& rng)
{
    Worksheet wks = Project.ActiveLayer();
    return wks.SetPrintArea(&rng);
}

EX2

BOOL Worksheet_ClearPrintArea_Ex2()
{
    Worksheet wks = Project.ActiveLayer();
    return wks.SetPrintArea(NULL);
}

Remark

See Also

Worksheet::GetPrintArea

Header to Include

origin.h