TextSelection::Untabify Method ()
Visual Studio 2015
Converts tabs to spaces in the selection according to the user's tab settings.
Assembly: EnvDTE (in EnvDTE.dll)
Sub UnTabifyExample() ' Before running this example, open a code document. Dim objSel As TextSelection = DTE.ActiveDocument.Selection ' Select all code in open document. objSel.SelectAll() ' Convert spaces in selection to Tab characters. objSel.Tabify() MsgBox("Converting tabs back to spaces...") objSel.Untabify() End Sub
Show: