Skip to content

Instantly share code, notes, and snippets.

@GraemeF
Created January 24, 2011 13:30
Show Gist options
  • Save GraemeF/793212 to your computer and use it in GitHub Desktop.
Save GraemeF/793212 to your computer and use it in GitHub Desktop.
ReplaceSpacesWithUnderscores
Sub ReplaceSpacesWithUnderscores()
Dim textSelection As EnvDTE.TextSelection
textSelection = CType(DTE.ActiveDocument.Selection(), EnvDTE.TextSelection)
textSelection.Text = textSelection.Text.Replace(" ", "_")
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment