I am trying to create a simple script that removes all punctuation from a character string that will vary in length and replace the punctuation with a space.
For example, I would like to copy text (e.g. 'To_what_extent_are_you_involved_with_any_of_the_following_professional_organisations), run the macro and return (to the system clipboard) 'To what extent are you involved with any of the following professional organisations' ready for pasting. I want the macro to remove all forms of punctuation, not just underscores.
To what extent are you involved with any of the following professional organisations run the macro and return to the system clipboard To what extent are you involved with any of the following professional organisations ready for pasting I want the macro to remove all forms of punctuation not just underscores
@Zabobon's pointed out the error in the variable name. But also worth mentioning that you don't need the variable at all (unless you want to keep your copied text unchanged for later in the macro):