Good day!
There is a problem:
Selected piece of text. In the allocation is as follows:
, .
Example: book 100, pencil 20, …
I would like to find the sum of the numbers in the row and write it at the end, that is,
book 100, the handle 20
$ 120
I’m trying to solve this problem, but does not go …
It is unclear, for example, how to access the character in the string.
Did so:
While i <> EndOfText
Char = Mid (AllSelectionText, i, 1)
If Char> = "0" And Char <= "9" Then
...
End If
i = i 1
Wend
But it is not very nice … must have a function like string (i).
How about using regular expressions? You would need to add a reference to Microsoft VBScript Regular Expressions 5.5, and then you could use the following (not tested):