Help Center
Help Center›AfxNova›Windows

CTextRow Class

Members (55)

ApplyApplies the formatting attributes of this text row object to the specified rows in the associated **ITextRange2**.AttachAttaches an **ITextRow** interface pointer to the class.CanChangeDetermines whether changes can be made to this row.CASTCast operator.CONSTRUCTORSCalled when a class variable is created.DESTRUCTORCalled automatically when a class variable goes out of scope or is destroyed.DetachDetaches the underlying **ITextRow** interface pointer from the class.GetAlignmentGets the horizontal alignment of a row.GetCellAlignmentGets the vertical alignment of the active cell.GetCellBorderColorsGets the border colors of the active cell.GetCellBorderWidthsGets the border widths of the active cell.GetCellColorBackGets the background color of the active cell.GetCellColorForeGets the foreground color of the active cell.GetCellCountGets the count of cells in a row.GetCellCountCacheGets the count of cells cached for this row.GetCellIndexGets the index of the active cell to get or set parameters for.GetCellMarginGets the cell margin of this row.GetCellMergeFlagsGets the merge flags of the active cell.GetCellShadingGets the shading of the active cell.GetCellVerticalTextGets the vertical-text setting of the active cell.GetCellWidthGets the width of the active cell.GetErrorInfoReturns a description of the last result code.GetHeightGets the height of the row.GetIndentGets the indent of this row.GetKeepTogetherGets whether this row is allowed to be broken across pages.GetKeepWithNextGets whether this row should appear on the same page as the row that follows it.GetLastResultReturns the last result codeGetNestLevelGets the nest level of a table.GetPropertyGets the value of the specified property.GetRTLGets whether this row has right-to-left orientation.InsertInserts a row, or rows, at the location identified by the associated **ITextRange2** object.IsEqualCompares two table rows to determine if they have the same properties.LETAssignment operator.ResetResets a row.SetAlignmentSets the horizontal alignment of a row.SetCellAlignmentSets the vertical alignment of the active cell.SetCellBorderColorsSets the border colors of the active cell.SetCellBorderWidthsSets the border widths of the active cell.SetCellColorBackSets the background color of the active cell.SetCellColorForeSets the foreground color of the active cell.SetCellCountSets the count of cells in a row.SetCellCountCacheSets the count of cells cached for this row.SetCellIndexSets the index of the active cell to get or set parameters for.SetCellMarginSets the cell margin of this row.SetCellMergeFlagsSets the merge flags of the active cell.SetCellShadingSets the shading of the active cell.SetCellVerticalTextSets the vertical-text setting of the active cell.SetCellWidthSets the width of the active cell.SetHeightSets the height of the row.SetIndentSets the indent of this row.SetKeepTogetherSets whether this row is allowed to be broken across pages.SetPropertySets the value of the specified property.SetResultSets the last result code.SetRTLSets whether this row has right-to-left orientation.TextRowPtrReturns a pointer to the underlying **ITextRow** interface.

Documentation

CTextRow Class

Class that wraps all the methods of the ITextRow interface.

NameDescription
CONSTRUCTORSCalled when a class variable is created.
DESTRUCTORCalled automatically when a class variable goes out of scope or is destroyed.
LETAssignment operator.
CASTCast operator.
TextRowPtrReturns a pointer to the underlying ITextRow interface.
AttachAttaches an ITextRow interface pointer to the class.
DetachDetaches the underlying ITextRow interface pointer from the class.

ITextRow Interface

The ITextRow interface provides methods to insert one or more identical table rows, and to retrieve and change table row properties. To insert nonidentical rows, call Insert for each different row configuration.

The ITextRow interface inherits from the IDispatch interface. ITextRow also has these types of members:

NameDescription
GetAlignmentGets the horizontal alignment of a row.
SetAlignmentSets the horizontal alignment of a row.
GetCellCountGets the count of cells in a row.
SetCellCountSets the count of cells in a row.
GetCellCountCacheGets the count of cells cached for this row.
SetCellCountCacheSets the count of cells cached for this row.
GetCellIndexGets the index of the active cell to get or set parameters for.
SetCellIndexSets the index of the active cell to get or set parameters for.
GetCellMarginGets the cell margin of this row.
SetCellMarginSets the cell margin of this row.
GetHeightGets the height of the row.
SetHeightSets the height of the row.
GetIndentGets the indent of this row.
SetIndentSets the indent of this row.
GetKeepTogetherGets whether this row is allowed to be broken across pages.
SetKeepTogetherSets whether this row is allowed to be broken across pages.
GetKeepWithNextGets whether this row should appear on the same page as the row that follows it.
SetKeepWithNextSets whether this row should appear on the same page as the row that follows it.
GetNestLevelGets the nest level of a table.
GetRTLGets whether this row has right-to-left orientation.
SetRTLSets whether this row has right-to-left orientation.
GetCellAlignmentGets the vertical alignment of the active cell.
SetCellAlignmentSets the vertical alignment of the active cell.
GetCellColorBackGets the background color of the active cell.
SetCellColorBackSets the background color of the active cell.
GetCellColorForeGets the foreground color of the active cell.
SetCellColorForeSets the foreground color of the active cell.
GetCellMergeFlagsGets the merge flags of the active cell.
SetCellMergeFlagsSets the merge flags of the active cell.
GetCellShadingGets the shading of the active cell.
SetCellShadingSets the shading of the active cell.
GetCellVerticalTextGets the vertical-text setting of the active cell.
SetCellVerticalTextSets the vertical-text setting of the active cell.
GetCellWidthGets the width of the active cell.
SetCellWidthSets the width of the active cell.
GetCellBorderColorsGets the border colors of the active cell.
GetCellBorderWidthsGets the border widths of the active cell.
SetCellBorderColorsSets the border colors of the active cell.
SetCellBorderWidthsSets the border widths of the active cell.
ApplyApplies the formatting attributes of this text row object to the specified rows in the associated ITextRange2.
CanChangeDetermines whether changes can be made to this row.
GetPropertyGets the value of the specified property.
InsertInserts a row, or rows, at the location identified by the associated ITextRange2 object.
IsEqualCompares two table rows to determine if they have the same properties.
ResetResets a row.
SetPropertySets the value of the specified property.

Methods inherited from CTextObjectBase Class

NameDescription
GetLastResultReturns the last result code
SetResultSets the last result code.
GetErrorInfoReturns a description of the last result code.

CONSTRUCTORS

Called when a CTextRow class variable is created.

DECLARE CONSTRUCTOR
DECLARE CONSTRUCTOR (BYVAL pTextRow AS ITextRow PTR, BYVAL fAddRef AS BOOLEAN = FALSE)

CONSTRUCTOR (Empty)

Can be used, for example, when we have an ITextRow interface pointer returned by a function and we want to attach it to a new instance of the CTextRow class. To get a pointer to the ITextRow interface call the GetRow method of the CTextDocument2 class.

DIM pCTextRow AS CTextRow
pCTextRow.Attach(pTextRow)

CONSTRUCTOR (ITextRow PTR)

CONSTRUCTOR CTextRow (BYVAL pTextRow AS ITextRow PTR, BYVAL fAddRef AS BOOLEAN = FALSE)
ParameterDescription
pTextRowAn ITextRow interface pointer.
fAddRefOptional. TRUE to increment the reference count of the passed ITextRow interface pointer; otherwise, FALSE. Default is FALSE.
Return value

A pointer to the new instance of the class.


DESTRUCTOR

Called automatically when a class variable goes out of scope or is destroyed.

DESTRUCTOR CTextRow

LET

Assignment operator. The assigned pointer must be an "addrefed" one.

OPERATOR LET (BYVAL pTextRow AS ITextRow PTR)

CAST

Cast operator.

OPERATOR CAST () AS ITextRow PTR

TextRowPtr

Returns a pointer to the underlying ITextRow interface

FUNCTION TextRowPtr () AS ITextRow PTR

Attach

Attaches an ITextRow interface pointer to the class.

FUNCTION Attach (BYVAL pTextRow AS ITextRow PTR, BYVAL fAddRef AS BOOLEAN = FALSE) AS HRESULT
ParameterDescription
pTextRowThe ITextRow interface pointer to attach.
fAddRefTRUE to increment the reference count of the object; otherwise, FALSE. Default is FALSE.

+++

Detach

Detaches the interface pointer from the class

FUNCTION Detach () AS ITextRow PTR

GetLastResult

Returns the last result code

FUNCTION GetLastResult () AS HRESULT

SetResult

Sets the last result code.

FUNCTION SetResult (BYVAL Result AS HRESULT) AS HRESULT
ParameterDescription
ResultThe HRESULT error code returned by the methods.

GetErrorInfo

Returns a description of the last result code.

FUNCTION CTOMBase.GetErrorInfo () AS DWSTRING
   IF SUCCEEDED(m_Result) THEN RETURN "Success"
   DIM s AS DWSTRING = "Error &h" & HEX(m_Result, 8)
   SELECT CASE m_Result
      CASE E_POINTER : s += ": E_POINTER - Null pointer"
      CASE S_OK : s += ": S_OK - Success"
      CASE S_FALSE : s += ": S_FALSE - Failure"
      CASE E_NOTIMPL : s += ": E_NOTIMPL - Not implemented."
      CASE E_INVALIDARG : s += ": E_INVALIDARG - Invalid argument"
      CASE E_OUTOFMEMORY : s += ": E_OUTOFMEMORY - Insufficient memory"
'      CASE E_FILENOTFOUND : s += "E_FILENOTFOUND - File not found"
      CASE &h80070002 : s += "E_FILENOTFOUND - File not found"
      CASE E_ACCESSDENIED : s += "E_ACCESSDENIED - Access denied"
      CASE E_FAIL : s += ": E_FAIL - Access denied"
      CASE NOERROR : s += ": NOERROR - Success" '' (same as S_OK)
      CASE CO_E_RELEASED:  : s += ": CO_E_RELEASED: - The object has been released"
      CASE ELSE
         s += "Unknown error"
   END SELECT
   RETURN s
END FUNCTION

GetAlignment

Gets the horizontal alignment of a row.

FUNCTION GetAlignment () AS LONG
Return value

The horizontal alignment. It can be one of the following values.

ConstantValueMeaning
tomAlignLeft0Text aligns with the left margin.
tomAlignCenter1Text is centered between the margins.
tomAlignRight2Text aligns with the right margin.
Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetAlignment

Sets the horizontal alignment of a row.

FUNCTION SetAlignment (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe new horizontal alignment. It can be one of the following values.
ConstantValueMeaning
tomAlignLeft0Text aligns with the left margin.
tomAlignCenter1Text is centered between the margins.
tomAlignRight2Text aligns with the right margin.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetCellCount

Gets the count of cells in this row.

FUNCTION GetCellCount () AS LONG
Return value

The cell count for this row.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellCount

Sets the count of cells in a row.

FUNCTION SetCellCount (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe row cell count.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetCellCountCache

Gets the count of cells cached for this row.

FUNCTION GetCellCountCache () AS LONG
Return value

The cached cell count.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellCountCache

Sets the count of cells cached for a row.

FUNCTION SetCellCountCache (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe row cell count.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Remarks

If all cells are identical, properties need to be cached only for the cell with index 0. If the cached count is less than the cell count, the cell parameters for index CellCountCache – 1 are used for cells with larger indices.


GetCellIndex

Gets the index of the active cell to get or set parameters for.

FUNCTION GetCellIndex () AS LONG
Return value

The cell index.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellIndex

Sets the index of the active cell.

FUNCTION SetCellIndex (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe cell index.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Remarks

You can get or set parameters for an active cell.

If the cell index is greater than the cell count, and the cell index is less that 63 (the maximum cell count), then the cell count is increased to cell index + 1.


GetCellMargin

Gets the cell margin of this row.

FUNCTION GetCellMargin () AS LONG
Return value

The cell margin.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellMargin

Sets the cell margin of a row.

FUNCTION SetCellMargin (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe cell margin. The cell margin is used for all cells in the row and is typically about 108 twips or 0.075 inches.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetHeight

Gets the height of the row.

FUNCTION GetHeight () AS LONG
Return value

The row height. A value of 0 indicates autoheight.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetHeight

Sets the cell margin of a row.

FUNCTION SetHeight (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe row height. A value of 0 indicates autoheight.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetIndent

Gets the indent of this row.

FUNCTION GetIndent () AS LONG
Return value

The indent of the row.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetIndent

Sets the indent of a row.

FUNCTION SetIndent (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe row indent.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetKeepTogether

Gets whether this row is allowed to be broken across pages.

FUNCTION GetKeepTogether () AS LONG
Return value

A tomBool value that indicates whether this row can be broken across pages.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetKeepTogether

Sets whether this row is allowed to be broken across pages.

FUNCTION SetKeepTogether (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueA tomBool value that indicates whether this row can be broken across pages.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetKeepWithNext

Gets whether this row is allowed to be broken across pages.

FUNCTION GetKeepWithNext () AS LONG
Return value

A tomBool value that indicates whether this row can be broken across pages.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


GetNestLevel

Gets the nest level of a table.

FUNCTION GetNestLevel () AS LONG
ParameterDescription
ValueThe nest level.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Remarks

The nest level of the table is identified by the associated ITextRange2 object. If there is only a single table, the nest level is 1. If there is no table, the nest level is 0.


GetRTL

Gets whether this row has right-to-left orientation.

FUNCTION GetRTL () AS LONG
Return value

A tomBool value that indicates whether this row has right-to-left orientation.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetRTL

Sets whether this row has right-to-left orientation.

FUNCTION SetRTL (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueA tomBool value that can be one of the following.
ValueMeaning
tomTrueRight-to-left orientation.
tomFalseLeft-to-right orientation.
tomToggleToggles the orientation.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetCellAlignment

Gets the vertical alignment of the active cell.

FUNCTION GetCellAlignment () AS LONG
Return value

The vertical alignment.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellAlignment

Sets the vertical alignment of the active cell.

FUNCTION SetCellAlignment (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe vertical alignment.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


>GetCellColorBack

Gets the background color of the active cell.

FUNCTION GetCellColorBack () AS LONG
Return value

The background color.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellColorBack

Sets the background color of the active cell.

FUNCTION SetCellColorBack (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe background color.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Remarks

See GetCellShading to see how the background color is used together with the foreground color.


GetCellColorFore

Gets the foreground color of the active cell.

FUNCTION GetCellColorFore () AS LONG
Return value

Gets the foreground color of the active cell.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellColorFore

Sets the foreground color of the active cell.

FUNCTION SetCellColorFore (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe foreground color.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Remarks

See GetCellShading to see how the foreground color is used together with the background color.


GetCellMergeFlags

Gets the merge flags of the active cell.

FUNCTION GetCellMergeFlags () AS LONG
Return value

The merge flag of the active cell. The flag can be one of the following:

FlagMeaning
tomHContCellAny cell except the start in a horizontally merged cell set.
tomHStartCellThe top cell in vertically merged cell set.
tomVLowCellAny cell except the top cell in a vertically merged cell set.
tomVTopCellThe top cell in vertically merged cell set.
Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellMergeFlags

Sets the merge flags of the active cell.

FUNCTION SetCellMergeFlags (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe merge flag. It can be one of these values.
FlagMeaning
tomHContCellAny cell except the start in a horizontally merged cell set.
tomHStartCellThe top cell in vertically merged cell set.
tomVLowCellAny cell except the top cell in a vertically merged cell set.
tomVTopCellThe top cell in vertically merged cell set.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetCellShading

Gets the shading of the active cell.

FUNCTION GetCellShading () AS LONG
Return value

The shading of the active cell. See Remarks.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.

Remarks

The shading is given in hundredths of a percent, so full shading is given by the value 10000. The shading percentage determines the mix of the cell foreground and background colors to be used for the cell background. A shading of 0 uses the cell background color alone. A shading of 10000 (100%) uses the foreground color alone. Values in between mix the foreground and background colors, weighting the background with (10000 – CellShading)/1000 and the foreground with CellShading/1000. These ratios are applied to the red, green, and blue channels independently of one another.


SetCellShading

Sets the shading of the active cell.

FUNCTION SetCellShading (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe shading of the active cell.
Remarks

The shading is given in hundredths of a percent, so full shading is given by the value 10000. The shading percentage determines the mix of the cell foreground and background colors to be used for the cell background. A shading of 0 uses the cell background color alone. A shading of 10000 (100%) uses the foreground color alone. Values in between mix the foreground and background colors, weighting the background with (10000 – CellShading)/1000 and the foreground with CellShading/1000. These ratios are applied to the red, green, and blue channels independently of one another.

Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetCellVerticalText

Gets the vertical-text setting of the active cell.

This property is not currently implemented.

FUNCTION GetCellVerticalText () AS LONG
Return value

The vertical-text setting.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellVerticalText

Sets the vertical-text setting of the active cell.

This property is not currently implemented.

FUNCTION SetCellVerticalText (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe vertical-text setting.

GetCellWidth

Gets the width of the active cell.

FUNCTION GetCellWidth () AS LONG
Return value

The width of the active cell, in twips.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.

Remarks

The width of the cell, and/or the entire row, must be less than 22 inches (1440 x 22).


SetCellWidth

Sets the active cell width in twips.

FUNCTION SetCellWidth (BYVAL Value AS LONG) AS HRESULT
ParameterDescription
ValueThe width of the active cell.
Remarks

The total width of the entire row must be less than 22 inches, or 1440×22.


GetCellBorderColors

Gets the border colors of the active cell.

FUNCTION GetCellBorderColors (BYVAL pcrLeft AS LONG PTR, BYVAL pcrTop AS LONG PTR, _
   BYVAL pcrRight AS LONG PTR, BYVAL pcrBottom AS LONG PTR) AS HRESULT
ParameterDescription
pcrLeftThe active-cell left border color.
pcrTopThe active-cell top border color.
pcrRightThe active-cell right border color.
pcrBottomThe active-cell bottom border color.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


GetCellBorderWidths

Gets the border widths of the active cell.

FUNCTION GetCellBorderWidths (BYVAL pduLeft AS LONG PTR, BYVAL pduTop AS LONG PTR, _
   BYVAL pduRight AS LONG PTR, BYVAL pduBottom AS LONG PTR) AS HRESULT
ParameterDescription
pduLeftThe active-cell left border width.
pduTopThe active-cell top border width.
pduRightThe active-cell right border width.
pduBottomThe active-cell bottom border width.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellBorderColors

Sets the border colors of the active cell.

FUNCTION SetCellBorderColors (BYVAL crLeft AS LONG, BYVAL crTop AS LONG, _
   BYVAL crRight AS LONG, BYVAL crBottom AS LONG) AS HRESULT
ParameterDescription
crLeftThe left border color.
crTopThe top border color.
crRightThe right border color.
crBottomThe bottom border color.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


SetCellBorderWidths

Sets the border widths of the active cell.

FUNCTION SetCellBorderWidths (BYVAL duLeft AS LONG, BYVAL duTop AS LONG, _
   BYVAL duRight AS LONG, BYVAL duBottom AS LONG) AS HRESULT
ParameterDescription
duLeftThe left border width.
duTopThe top border width.
duRightThe right border width.
duBottomThe bottom border width.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


Apply

Applies the formatting attributes of this text row object to the specified rows in the associated ITextRange2.

FUNCTION Apply (BYVAL cRow AS LONG, BYVAL Flags AS LONG) AS HRESULT
ParameterDescription
cRowThe number of rows to apply this text row object to.
FlagsA flag that controls how the formatting attributes are applied. It can be one of the following values.
ValueMeaning
tomCellStructureChangeOnlyApply formatting attributes only to cell widths or the cell count (enables you to change column widths or insert/delete columns without changing other properties, such as cell borders).
tomRowApplyDefaultApply formatting attributes to the full application, not just cell widths and count.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


CanChange

Determines whether changes can be made to this row.

FUNCTION CanChange () AS LONG
Return value

A tomBool indicating whether the row can be edited. It is tomTrue only if the row can be edited.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


GetProperty

Gets the value of the specified property.

FUNCTION GetProperty (BYVAL nType AS LONG) AS LONG
ParameterDescription
nTypeThe ID of the property to retrieve.
Return value

The value for the property.

Result code

If the method succeeds, GetLastResult returns NOERROR. Otherwise, it returns an HRESULT error code.


Insert

Inserts a row, or rows, at the location identified by the associated ITextRange2 object.

FUNCTION Insert (BYVAL cRow AS LONG) AS HRESULT
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


IsEqual

Compares two table rows to determine if they have the same properties.

FUNCTION IsEqual (BYVAL pRow AS ITextRow PTR) AS LONG
ParameterDescription
pRowThe row to compare to.
Return value

The comparison result: tomTrue if equal, and tomFalse if not.

Result code

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.


Reset

Resets a row.

FUNCTION Reset (BYVAL Value AS LONG = tomRowUpdate) AS HRESULT
ParameterDescription
ValueThe **tomRowUpdate reset value: Update the row to have the properties of the table row identified by the associated text range.
Return value

If the method succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes.

Result codeDescription
E_ACCESSDENIEDWrite access is denied.
E_OUTOFMEMORYInsufficient memory.

SetProperty

Sets the value of the specified property.

FUNCTION SetProperty (BYVAL nType AS LONG, BYVAL Value AS LONG) AS HRESULT
ParameterDescription
nTypeThe ID of the property to set.
ValueThe value to set.
Return value

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.