-
You'll need to assign the text to a string variable first so you can do stuff with it.
If you're selection has bulleted or numbered styles, then the text property shouldn't be carrying those over. You will have to strip off paragraph mark at the end tho.[VBA]Dim strText As String
strText = Application.Selection.Text
'get rid of paramark
If Right(strText, 1) = Chr(13) Then strText = Left(strText, Len(strText) - 1)
'remove leading and trailing spaces
strText = Trim(strText)
TextBox1.Text = strText[/VBA]
K :-)

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules