wxAutoExcel  2.0.0
wxAutoExcel::wxExcelTextRange2 Class Reference

Represents Microsoft Excel TextRange2 object. More...

Inheritance diagram for wxAutoExcel::wxExcelTextRange2:
wxAutoExcel::wxExcelObject

Public Member Functions

void AddPeriods ()
 Adds period (.) punctuation to the right side of the text contained in TextRange2 object for left-to-right languages and on the left side for right-to-left languages. More...
 
void ChangeCase (MsoTextChangeCase type)
 Changes the case of a TextRange2 object to one of the values in the MsoTextChangeCase enumeration. More...
 
void Copy ()
 Copies a TextRange2 object. More...
 
void Cut ()
 Removes a portion or all of the text from a range of text. More...
 
void Delete ()
 Deletes a TextRange2 object. More...
 
wxExcelTextRange2 Find (const wxString &findWhat, long *after=NULL, MsoTriState *matchCase=NULL, MsoTriState *wholeWords=NULL)
 Searches a TextRange2 object for a subset of text. More...
 
wxExcelTextRange2 InsertAfter (const wxString &newText)
 Inserts text to the right of the existing text in the TextRange2 object. More...
 
wxExcelTextRange2 InsertBefore (const wxString &newText)
 Inserts text to the left of the existing text in the TextRange2 object. More...
 
wxExcelTextRange2 InsertChartField (MsoChartFieldType chartFieldType, const wxString &formula=wxEmptyString, long *position=NULL)
 Inserts a field into the body of a data label in a chart. More...
 
wxExcelTextRange2 InsertSymbol (const wxString &fontName, long charNumber, MsoTriState unicode)
 Inserts a symbol from the specified font set into the range of text represented by the TextRange2 object. More...
 
wxExcelTextRange2 Item (long index)
 Gets the range of text specified by the index number from the TextRange2 object. More...
 
void LtrRun ()
 Returns a TextRange2 Represents the specified subset of left-to-right text runs. More...
 
wxExcelTextRange2 Paste ()
 Pastes the contents of the Clipboard into the TextRange2 object. More...
 
wxExcelTextRange2 PasteSpecial (MsoClipboardFormat format)
 Replaces the text range with the contents of the Clipboard in the format specified. More...
 
void RemovePeriods ()
 Removes all period (.) punctuation from the text in the TextRange2 object. More...
 
wxExcelTextRange2 Replace (const wxString &findWhat, const wxString &replaceWhat, long *after=NULL, MsoTriState *matchCase=NULL, MsoTriState *wholeWords=NULL)
 Finds specific text in a text range, replaces the found text with a specified string, and returns a TextRange2 Represents the first occurrence of the found text. More...
 
void RotatedBounds (double &X1, double &Y1, double &X2, double &Y2, double &X3, double &Y3, double &X4, double &Y4)
 NOT IMPLEMENTED. More...
 
wxExcelTextRange2 RtlRun ()
 Returns a TextRange2 Represents the specified subset of right-to-left text runs. More...
 
void Select ()
 Selects the TextRange2 object. More...
 
wxExcelTextRange2 TrimText ()
 Removes the white space on the left and right sides of the text in the TextRange2 object. More...
 
double GetBoundHeight ()
 Gets the height, in points, of the text bounding box for the specified text. More...
 
double GetBoundLeft ()
 Gets the left coordinate, in points, of the text bounding box for the specified text. More...
 
double GetBoundTop ()
 Gets the top coordinate, in points, of the text bounding box for the specified text. More...
 
double GetBoundWidth ()
 Gets the width, in points, of the text bounding box for the specified text. More...
 
wxExcelTextRange2 GetCharacters (long start=1, long *length=NULL)
 MSDN documentation for TextRange2.Characters. More...
 
long GetCount ()
 Gets a Long indicating the number of items in the TextRange2 collection. More...
 
wxExcelFont2 GetFont ()
 Returns a Font Represents character formatting for the TextRange2 object. More...
 
MsoLanguageID GetLanguageID ()
 Gets or sets the MsoLanguageID value of the TextRange2 object. More...
 
void SetLanguageID (MsoLanguageID languageID)
 Gets or sets the MsoLanguageID value of the TextRange2 object. More...
 
long GetLength ()
 Get a Long that represents the length of a text range. More...
 
wxExcelTextRange2 GetLines ()
 Returns a TextRange2 Represents the specified subset of text lines. More...
 
wxExcelTextRange2 GetMathZones (long start=1, long *length=NULL)
 MSDN documentation for TextRange2.MathZones. More...
 
wxExcelParagraphFormat2 GetParagraphFormat ()
 Returns a ParagraphFormat Represents paragraph formatting for the specified text. More...
 
wxExcelTextRange2 GetParagraphs ()
 Gets a TextRange2 Represents the specified subset of text paragraphs. More...
 
wxExcelTextRange2 GetRuns ()
 Gets a TextRange2 Represents the specified subset of text runs. More...
 
wxExcelTextRange2 GetSentences ()
 Returns a TextRange2 Represents the specified subset of text sentences. More...
 
long GetStart ()
 Gets a Long value indicating the starting point of the specified text range. More...
 
wxString GetText ()
 Gets or sets a String value that represents the text in a text range. More...
 
void SetText (const wxString &text)
 Gets or sets a String value that represents the text in a text range. More...
 
wxExcelTextRange2 GetWords ()
 Gets a TextRange2 Represents the specified subset of text words. More...
 
virtual wxString GetAutoExcelObjectName_ () const
 Returns "TextRange2". More...
 
- Public Member Functions inherited from wxAutoExcel::wxExcelObject
bool IsOk_ () const
 Returns true if the object has a valid dispatch. More...
 
wxString GetAutomationObjectName_ (bool stripUnderscores=false) const
 Returns object name as provided by IDispatch->GetTypeInfo()->GetDocumentation(MEMBERID_NIL, &name, NULL, NULL, NULL). More...
 
wxSharedPtr< wxAutomationObject > GetAutomationObject_ ()
 Returns the underlying wxAutomationObject. More...
 
 operator bool () const
 Returns true if the object has a valid dispatch and its last automation call (if any), i.e. More...
 
WXLCID GetAutomationLCID_ () const
 Returns the locale identifier used in automation calls. More...
 
bool SetAutomationLCID_ (WXLCID lcid)
 Sets the locale identifier to be used in automation calls. More...
 
bool GetPropertyAndMethodNames_ (wxArrayString &propertyNames, wxArrayString &methodNames, bool includeHidden=false)
 Returns lists of property and method names the automation interface exposes. More...
 
bool GetUnimplementedObject_ (const wxString &name, wxAutomationObject &object)
 Helper function for receiving an automation object not implemented in wxAutoExcel, see FAQ on how to use. More...
 

Additional Inherited Members

- Public Types inherited from wxAutoExcel::wxExcelObject
enum  ErrorFlags {
  Err_DoNothing = 0 , Err_LogOnInvalidDispatch = 1 , Err_AssertOnInvalidDispatch = 1 << 1 , Err_ThrowOnInvalidDispatch = 1 << 2 ,
  Err_LogOnInvalidArgument = 1 << 3 , Err_AssertOnInvalidArgument = 1 << 4 , Err_ThrowOnInvalidArgument = 1 << 5 , Err_LogOnFailedInvoke = 1 << 6 ,
  Err_AssertOnFailedInvoke = 1 << 7 , Err_ThrowOnFailedInvoke = 1 << 8 , Err_LogOnInvalidReturnType = 1 << 9 , Err_AssertOnInvalidReturnType = 1 << 10 ,
  Err_ThrowOnInvalidReturnType = 1 << 11 , Err_LogOnOtherError = 1 << 12 , Err_AssertOnOtherError = 1 << 13 , Err_ThrowOnOtherError = 1 << 14
}
 Flags affecting the behaviour of wxExcelObject and its descendants when an error occurs during accessing an Excel object property or calling its method. More...
 
- Static Public Member Functions inherited from wxAutoExcel::wxExcelObject
static unsigned GetErrorMode_ ()
 Sets the error mode to the combination of wxExcelObject::ErrorFlags. More...
 
static void SetErrorMode_ (unsigned mode)
 Sets the error mode as the combination of wxExcelObject::ErrorFlags. More...
 
static bool GetUnimplementedCollectionItem_ (wxAutomationObject &collection, const long index, wxAutomationObject &item, bool asProperty)
 Helper function for obtaining an item from MS Excel collection not implemented in wxAutoExcel, see FAQ on how to use. More...
 

Detailed Description

Represents Microsoft Excel TextRange2 object.

Member Function Documentation

◆ AddPeriods()

void wxAutoExcel::wxExcelTextRange2::AddPeriods ( )

Adds period (.) punctuation to the right side of the text contained in TextRange2 object for left-to-right languages and on the left side for right-to-left languages.

MSDN documentation for TextRange2.AddPeriods.

◆ ChangeCase()

void wxAutoExcel::wxExcelTextRange2::ChangeCase ( MsoTextChangeCase  type)

Changes the case of a TextRange2 object to one of the values in the MsoTextChangeCase enumeration.

MSDN documentation for TextRange2.ChangeCase.

◆ Copy()

void wxAutoExcel::wxExcelTextRange2::Copy ( )

Copies a TextRange2 object.

MSDN documentation for TextRange2.Copy.

◆ Cut()

void wxAutoExcel::wxExcelTextRange2::Cut ( )

Removes a portion or all of the text from a range of text.

[MSDN documentation for TextRange2.Cut]().

◆ Delete()

void wxAutoExcel::wxExcelTextRange2::Delete ( )

Deletes a TextRange2 object.

MSDN documentation for TextRange2.Delete.

◆ Find()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::Find ( const wxString &  findWhat,
long *  after = NULL,
MsoTriState matchCase = NULL,
MsoTriState wholeWords = NULL 
)

Searches a TextRange2 object for a subset of text.

MSDN documentation for TextRange2.Find.

◆ InsertAfter()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::InsertAfter ( const wxString &  newText)

Inserts text to the right of the existing text in the TextRange2 object.

MSDN documentation for TextRange2.InsertAfter.

◆ InsertBefore()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::InsertBefore ( const wxString &  newText)

Inserts text to the left of the existing text in the TextRange2 object.

MSDN documentation for TextRange2.InsertBefore.

◆ InsertChartField()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::InsertChartField ( MsoChartFieldType  chartFieldType,
const wxString &  formula = wxEmptyString,
long *  position = NULL 
)

Inserts a field into the body of a data label in a chart.

MSDN documentation for TextRange2.InsertChartField.

◆ InsertSymbol()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::InsertSymbol ( const wxString &  fontName,
long  charNumber,
MsoTriState  unicode 
)

Inserts a symbol from the specified font set into the range of text represented by the TextRange2 object.

MSDN documentation for TextRange2.InsertSymbol.

◆ Item()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::Item ( long  index)

Gets the range of text specified by the index number from the TextRange2 object.

MSDN documentation for TextRange2.Item.

◆ LtrRun()

void wxAutoExcel::wxExcelTextRange2::LtrRun ( )

Returns a TextRange2 Represents the specified subset of left-to-right text runs.

A text run consists of a range of characters that share the same font attributes.

MSDN documentation for TextRange2.LtrRun.

◆ Paste()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::Paste ( )

Pastes the contents of the Clipboard into the TextRange2 object.

MSDN documentation for TextRange2.Paste.

◆ PasteSpecial()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::PasteSpecial ( MsoClipboardFormat  format)

Replaces the text range with the contents of the Clipboard in the format specified.

If the paste succeeds, this method returns a TextRange2 object including the text range that was pasted.

MSDN documentation for TextRange2.PasteSpecial.

◆ RemovePeriods()

void wxAutoExcel::wxExcelTextRange2::RemovePeriods ( )

Removes all period (.) punctuation from the text in the TextRange2 object.

MSDN documentation for TextRange2.RemovePeriods.

◆ Replace()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::Replace ( const wxString &  findWhat,
const wxString &  replaceWhat,
long *  after = NULL,
MsoTriState matchCase = NULL,
MsoTriState wholeWords = NULL 
)

Finds specific text in a text range, replaces the found text with a specified string, and returns a TextRange2 Represents the first occurrence of the found text.

Returns Nothing if no match is found.

MSDN documentation for TextRange2.Replace.

◆ RotatedBounds()

void wxAutoExcel::wxExcelTextRange2::RotatedBounds ( double &  X1,
double &  Y1,
double &  X2,
double &  Y2,
double &  X3,
double &  Y3,
double &  X4,
double &  Y4 
)

NOT IMPLEMENTED.

wxAutomationObject does not support passing arguments by reference.

Gets the coordinates of the vertices of the text bounding box for the specified text range. Read-only.

MSDN documentation for TextRange2.RotatedBounds.

◆ RtlRun()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::RtlRun ( )

Returns a TextRange2 Represents the specified subset of right-to-left text runs.

A text run consists of a range of characters that share the same font attributes.

MSDN documentation for TextRange2.RtlRun.

◆ Select()

void wxAutoExcel::wxExcelTextRange2::Select ( )

Selects the TextRange2 object.

MSDN documentation for TextRange2.Select.

◆ TrimText()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::TrimText ( )

Removes the white space on the left and right sides of the text in the TextRange2 object.

MSDN documentation for TextRange2.TrimText.

◆ GetBoundHeight()

double wxAutoExcel::wxExcelTextRange2::GetBoundHeight ( )

Gets the height, in points, of the text bounding box for the specified text.

MSDN documentation for TextRange2.BoundHeight.

◆ GetBoundLeft()

double wxAutoExcel::wxExcelTextRange2::GetBoundLeft ( )

Gets the left coordinate, in points, of the text bounding box for the specified text.

MSDN documentation for TextRange2.BoundLeft.

◆ GetBoundTop()

double wxAutoExcel::wxExcelTextRange2::GetBoundTop ( )

Gets the top coordinate, in points, of the text bounding box for the specified text.

MSDN documentation for TextRange2.BoundTop.

◆ GetBoundWidth()

double wxAutoExcel::wxExcelTextRange2::GetBoundWidth ( )

Gets the width, in points, of the text bounding box for the specified text.

MSDN documentation for TextRange2.BoundWidth.

◆ GetCharacters()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::GetCharacters ( long  start = 1,
long *  length = NULL 
)

◆ GetCount()

long wxAutoExcel::wxExcelTextRange2::GetCount ( )

Gets a Long indicating the number of items in the TextRange2 collection.

MSDN documentation for TextRange2.Count.

◆ GetFont()

wxExcelFont2 wxAutoExcel::wxExcelTextRange2::GetFont ( )

Returns a Font Represents character formatting for the TextRange2 object.

MSDN documentation for TextRange2.Font.

◆ GetLanguageID()

MsoLanguageID wxAutoExcel::wxExcelTextRange2::GetLanguageID ( )

Gets or sets the MsoLanguageID value of the TextRange2 object.

MSDN documentation for TextRange2.LanguageID.

◆ SetLanguageID()

void wxAutoExcel::wxExcelTextRange2::SetLanguageID ( MsoLanguageID  languageID)

Gets or sets the MsoLanguageID value of the TextRange2 object.

MSDN documentation for TextRange2.LanguageID.

◆ GetLength()

long wxAutoExcel::wxExcelTextRange2::GetLength ( )

Get a Long that represents the length of a text range.

MSDN documentation for TextRange2.Length.

◆ GetLines()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::GetLines ( )

Returns a TextRange2 Represents the specified subset of text lines.

MSDN documentation for TextRange2.Lines.

◆ GetMathZones()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::GetMathZones ( long  start = 1,
long *  length = NULL 
)

◆ GetParagraphFormat()

wxExcelParagraphFormat2 wxAutoExcel::wxExcelTextRange2::GetParagraphFormat ( )

Returns a ParagraphFormat Represents paragraph formatting for the specified text.

MSDN documentation for TextRange2.ParagraphFormat.

◆ GetParagraphs()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::GetParagraphs ( )

Gets a TextRange2 Represents the specified subset of text paragraphs.

MSDN documentation for TextRange2.Paragraphs.

◆ GetRuns()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::GetRuns ( )

Gets a TextRange2 Represents the specified subset of text runs.

A text run consists of a range of characters that share the same font attributes.

MSDN documentation for TextRange2.Runs.

◆ GetSentences()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::GetSentences ( )

Returns a TextRange2 Represents the specified subset of text sentences.

MSDN documentation for TextRange2.Sentences.

◆ GetStart()

long wxAutoExcel::wxExcelTextRange2::GetStart ( )

Gets a Long value indicating the starting point of the specified text range.

MSDN documentation for TextRange2.Start.

◆ GetText()

wxString wxAutoExcel::wxExcelTextRange2::GetText ( )

Gets or sets a String value that represents the text in a text range.

MSDN documentation for TextRange2.Text.

◆ SetText()

void wxAutoExcel::wxExcelTextRange2::SetText ( const wxString &  text)

Gets or sets a String value that represents the text in a text range.

MSDN documentation for TextRange2.Text.

◆ GetWords()

wxExcelTextRange2 wxAutoExcel::wxExcelTextRange2::GetWords ( )

Gets a TextRange2 Represents the specified subset of text words.

MSDN documentation for TextRange2.Words.

◆ GetAutoExcelObjectName_()

virtual wxString wxAutoExcel::wxExcelTextRange2::GetAutoExcelObjectName_ ( ) const
inlinevirtual

Returns "TextRange2".

Reimplemented from wxAutoExcel::wxExcelObject.