SHAPETEXT Function
Gets the text from a shape.
Syntax
SHAPETEXT (shapename!TheText[,flag]**)
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
shapename!TheText |
Required |
A reference to the cell named TheText in the target shape. Shapename! is the name of the shape from which you want to retrieve the text. |
|
flag |
Optional |
Numeric |
A bit that specifies the format of the text. The default flag (0) shows the text exactly as it is shown in the shape. |
Return Value
String
Remarks
You can use any combination of the following flags with the SHAPETEXT function.
Flag |
Description |
---|---|
0 |
Show text exactly as shown in shape. |
1 |
Include discretionary hyphens. |
2 |
Don't include expanded text in fields. |
4 |
Convert tabs to a single space. |
8 |
Convert tabs to a set of spaces. |
16 |
Convert carriage returns and line feeds to spaces. |
32 |
Convert typographer quotes to regular quotes. |
64 |
Convert adjacent white space to a single space. |
Example 1
SHAPETEXT(sheetN!theText)
Returns the text of the shape named sheetN, exactly as it is shown in the shape.
Example 2
SHAPETEXT(theText)
Returns the text of the current shape exactly as it is shown in the shape.
Example 3
SHAPETEXT(theText, 84)
Returns the text of the current shape. It also converts adjacent white space to a single space (64), converts carriage returns and line feeds to spaces (16), and converts tabs to a single space (4). The sum of these flags is 84.