BlockCount
This read-only property returns the number of TextBlocks of the workdoc. Use this property before accessing the TextBlock property where an index is required. The range of valid indices for TextBlocks is from 0 to BlockCount –1.
Syntax
BlockCount as Long
Sample Code
The following sample code writes the text of each block to the string array "strBlockText".
Dim strBlockText() as String
Dim intBlockCount as Integer
Dim i as Long
intBlockCount = pWorkdoc.BlockCount -1
ReDim strBlockText(intBlockCount)
For i=0 To intBlockCount
strBlockText(i) = pWorkdoc.TextBlock(i).Text
Next i