Sub TrimDemo() Dim strUntrimmed As String, strTrimmed As String strUntrimmed = Selection.Text strTrimmed = Trim(strUntrimmed)End Sub