ramesh83
03-20-2009, 07:56 AM
I have a form with a textbox that a user pastes text into (body of a letter).
The form then passes the text over to a report that generates the rest of the letter. I have managed to make all this work well using vba.
The only issue is that I have set the text box to allow rich text so that the user can paste in formatting if that want. (bold italics ect.)
What I want to do is to change the text’s font to match the font on the report. I have managed to use the .selstart .sellength to select the text but I can’t work out if there is a way of referencing the selected text.
Text2.SetFocus
Text2.SelStart = "0"
Text2.SelLength = Len(Text2.Text)
What I want to say is something like selected text = font name “some font”.
I don’t want to use a rich text box.
Anyone know a solution?
Thanks in advance.
The form then passes the text over to a report that generates the rest of the letter. I have managed to make all this work well using vba.
The only issue is that I have set the text box to allow rich text so that the user can paste in formatting if that want. (bold italics ect.)
What I want to do is to change the text’s font to match the font on the report. I have managed to use the .selstart .sellength to select the text but I can’t work out if there is a way of referencing the selected text.
Text2.SetFocus
Text2.SelStart = "0"
Text2.SelLength = Len(Text2.Text)
What I want to say is something like selected text = font name “some font”.
I don’t want to use a rich text box.
Anyone know a solution?
Thanks in advance.