Try something along the following lines:
Code:
Sub Demo()
Application.ScreenUpdating = True
Dim i As Long
With Selection
For i = 1 To .Paragraphs.Count
With .Paragraphs(i).Range.Characters.First
Select Case Int(PointsToInches(.Information(wdHorizontalPositionRelativeToTextBoundary)) * 4)
Case 1: .InsertBefore vbTab
Case 2: .InsertBefore vbTab & vbTab
Case 3: .InsertBefore vbTab & vbTab & vbTab
Case 4: .InsertBefore vbTab & vbTab & vbTab & vbTab
Case 5: .InsertBefore vbTab & vbTab & vbTab & vbTab & vbTab
Case 6: .InsertBefore vbTab & vbTab & vbTab & vbTab & vbTab & vbTab
Case 7: .InsertBefore vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab
Case 8: .InsertBefore vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab
Case 9: .InsertBefore vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab
End Select
End With
Next
.ParagraphFormat.Alignment = wdAlignParagraphLeft
.ClearParagraphAllFormatting
End With
Application.ScreenUpdating = True
End Sub
or:
Code:
Sub Demo()
Application.ScreenUpdating = True
Dim i As Long, j As Long, StrTmp As String
With Selection
For i = 1 To .Paragraphs.Count
StrTmp = vbNullString
With .Paragraphs(i).Range.Characters.First
For j = 0 To Int(PointsToInches(.Information(wdHorizontalPositionRelativeToTextBoundary)) * 4)
StrTmp = StrTmp & vbTab
Next
.InsertBefore StrTmp
End With
Next
.ParagraphFormat.Alignment = wdAlignParagraphLeft
.ClearParagraphAllFormatting
End With
Application.ScreenUpdating = True
End Sub
As coded, the macros apply tabs to a selected block of text. You may need to play around with the '* 4' and even subtract a constant value from than line to get the kind of indenting you desire. I'd suggest going even further: Define a 'code' Style with whatever final tab-stop positions you'd prefer and apply that to the range after the '.ClearParagraphAllFormatting' line. The second macro is more flexible, as it accommodates any level of indenting.