Visual Studio - How to disable autoformat/correct while running macro?
- by Sam
When running a macro that changes the selected text, tags are automatically closed and the text formatted. How can I prevent that from happening?
For example, wrapping text in a tag:
DTE.ActiveDocument.Selection.Text = String.Format("<tag>{0}</tag>", DTE.ActiveDocument.Selection.Text)
Ends up with two closing tags:
…