Corel MACRO. how to replace text to dynamic text?

Hello,

I'm new with corel macros, need some help:)

I'm making tickets and i need to add tickets numbers, from 1 to 1000. Print & Merge doesnt fit for me.

So I want to change text tag for example: "<text>" to text witch will be different (1, 2 ,3 ,4 ,5 ,6 ,7 ...)

 

I found an post in this forum from Hendrik Wagenaar where the code finds word "Andorra" and change it to "Andorre". Maybe where is simple way to modify this code, that it could work to make increasing numbers.

 

CODE:

Public Function FindReplace(ByVal str As String, ByVal toFind As String, ByVal toReplace As String) As String
    Dim i As Integer
    For i = 1 To Len(str)
        If Mid(str, i, Len(toFind)) = toFind Then   ' does the string match?
            FindReplace = FindReplace & toReplace               ' add the new replacement to the final result
            i = i + (Len(toFind) - 1)               ' move to the character after the toFind
        Else
            FindReplace = FindReplace & Mid(str, i, 1)        ' add a character
        End If
    Next i
End Function

Public Sub TextTranslate()
    Dim s As Shape
    ActiveDocument.BeginCommandGroup "Text Translate"
    For Each s In ActiveDocument.ActivePage.Shapes
        If s.Type = cdrTextShape Then
            s.Text.Story = FindReplace(s.Text.Story, "Andorra", "Andorre")
            s.Text.Story = FindReplace(s.Text.Story, "Albania", "Albanie")
        End If
    Next s
    ActiveDocument.EndCommandGroup
End Sub