What output are you expecting and what are you getting? I'm trimming and replacing and it seems ok.
Trim removes the spaces outside of a text value so, ' this is my text ' would become, 'this is my text'. 'this is my text' would require something else to normalize the text to single characters.
You would need to write a while loop that checks to see if the text contains two spaces and replace with a single space:
While myText contains ' '
set myText = Replace ' ' with ' '
end while
I attached a sample profile that has a single command that does that. I've added a note to add this functionality to VA.