Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My document has lines with tabs at 0.83, 1.68 and 1.92 inches. Other lines have only one tab, at 1.92 inches. I would like to programmatically be able to identify the lines that have only one tab at 1.92 inches and change that line's setting so it has tabs at 0.83, 1.68 and 1.92 inches. Any guidance is appreciated. Thanks!!!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Try this:
    Code:
    Sub SetTabs()
      Dim par As Paragraph
      For Each par In ActiveDocument.Paragraphs
    	If Abs(par.TabStops(1).Position - InchesToPoints(1.92)) < 1 Then
    	  par.TabStops.Add Position:=InchesToPoints(0.83)
    	  par.TabStops.Add Position:=InchesToPoints(1.68)
    	End If
      Next par
    End Sub
    Or create and apply a style...

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, Hans!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •