Hello,
I need some help here, I am trying to Read a word document using Aspose.Word. What I am trying to do is whenever I hit a number (in any format, i.e. numeric, roman or alphabetic) save the paragraph into my database.
I have attached a test document, which has bullet numbers for each paragraph. When I use this document and when it reaches the VisitParagraphStart function of my program, Paragraph.Range.Text is returning only the TEXT and IGNORING the bullet numbers(i.e. 1,2,3 or a,b,c…) . In order to work properly, I need to retrieve the text of each paragraph along with the actual bullet numbers. Please give me a code example how to achieve that. Thanks.
Here is my function:
Public Overrides Function VisitParagraphStart(ByVal paragraph As Aspose.Words.Paragraph) As Aspose.Words.VisitorAction
Try
Dim sText As String = paragraph.Range.Text.Trim()
‘HERE, I need to get the full string ALONG WITH the numbering, BUT all I am getting is text without the bullet numbers.
‘StartWithNumber is a simple function that checks if the first character is a number (i.e. 1,2,3... or a,b,c... or I,II,III...)
If sText.StartWithNumber Then Msgbox(sText)
Return VisitorAction.Continue
Catch ex As Exception
'In case of Error, Keep going to Next Node.
Return VisitorAction.SkipThisNode
End Try
End Function
Please give me a code example of how to retrieve the text of each paragraph ALONG WITH the actual Bullet Numbering. Thanks very much in advance.
Jerry.