Hi friends i want your help if someone can help.Can you tell me how i can marking all the letters that its inside the parentheses ,so i can make them red ?
Option ExplicitPrivate Const STARTCHAR = TextBox1.TextPrivate Const ENDCHAR = TextBox2.TextPrivate Const FINDCOLOR = RGB(0, 0, 0)Private Const REPLACECOLOR = RGB(255, 0, 0)Dim StartPos, EndPos As IntegerPrivate Sub CancelButton_Click()Application.QuitEnd Sub
Sub RedTextInsideParentheses() Dim s As Shape, i& For Each s In ActiveSelectionRange If s.Type = cdrTextShape Then For i = 1 To s.Text.Story.Length If s.Text.Story.Characters(i).Text = "(" Then While s.Text.Story.Characters(i - 1).Text <> ")" s.Text.Story.Characters(i).Fill.UniformColor.RGBAssign 255, 0, 0 i = i + 1 Wend End If Next i End If Next sEnd SubRegardsTaras
Thank you for your answer .But i want the whole document to search and not only in the selected one.I want to get the first parenthesis from a textbox,and then get the second parenthesis from another textbox.I also want to display a completion message when it finishes.
And finally display a completion message when it finishes.
Thank you ,i ll be waiting for your answer