ext = GetFileExt(ActiveDocument.FullName)
if ext = "cpp" or ext = "h" or ext = "cxx" or ext = "hxx" or ext = "hpp" Then
If .BottomLine > .TopLine Then
col = .CurrentColumn
first = .CurrentColumn
If col > first Then
.MoveTo .CurrentLine, col
When I moved to Visual Studio .Net 2003, the above macro no longer worked. So the following was created. Unfortunately you can no longer map the tab key, so I mapped it to ctrl-;.
Dim ts As TextSelection = DTE.ActiveWindow.Selection
Recently I moved to Visual Studio .Net 2005 and have been doing some C# coding. I found the above macro does not seem to work. Today I changed it to the following which appears to work just fine.