View Full Version : Referencing Selected text access 2007


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.

ramesh83
03-22-2009, 12:52 AM
does anyone know if this is even possible?

DCrake
03-23-2009, 01:48 AM
Access does not support formatted text in a single control, it is either bold, itallic, underlined, etc. You would have to use a rich text formatted text box to handle this.

David