Advertisement
pawtech

W_SetDecimalBreak

Sep 29th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub SetDecimalTab()
  2. ' Ctrl+(
  3.   Dim CW
  4.     CW = PointsToInches(Selection.Cells.PreferredWidth) - 0.06
  5.     Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
  6.     Selection.ParagraphFormat.TabStops.ClearAll
  7.     Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(CW), _
  8.         Alignment:=wdAlignTabDecimal, Leader:=wdTabLeaderSpaces
  9.        
  10.     With Selection.Find
  11.         .Text = "-"
  12.         .Replacement.Text = "-  "
  13.         .MatchWildcards = False
  14.     End With
  15.     Selection.Find.Execute Replace:=wdReplaceAll
  16. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement