I have code that automatically detects certain text based on a selection and places onto a user form.
The issue I face is removing the trailing paragraph marker. (see picture below):
I have tried the following and other variations, but I can't remove the trailing paragraph marker:
Dim theText As String
theText = Replace(Selection, "^p", "")
Lastly, I know I can use Left(Selection,Len(Selection)-1)
, but this will fail if the paragraph marker is not there.