Loading ...
Sorry, an error occurred while loading the content.

2189Multiple spaces > tab macro

Expand Messages
  • John Rethorst
    Oct 5, 2005
    • 0 Attachment
      I find tables on the net where in each row the text of the first column is separated from the
      second column by some number of spaces – a varying number, depending on how the
      writer formatted it with the font used etc., and I want to replace each group of multiple
      spaces with a tab. This macro searches from the insertion point forward for multiple
      spaces, replacing each set with a tab:

      Find/Change Direction (Forward;No Wrap)
      Find/Change Where ({Current Doc})
      Find/Change Match (Partial Word;Case Insensitive;Alphabet Insensitive;CharRep
      Insensitive;{Text Only})
      Find/Change Action (Select Match)
      Find String ("[Language:English (USA)][Font:Geneva][Size:12] ")
      ;
      Repeat
      Find
      If (!FindStatusFlag)
      Find/Change Reset
      Alert ("I could not find any more multiple spaces in this document.")
      Return
      End If
      ;
      Repeat
      Raw Read (char;Right)
      Until (RawObject!=" ")
      Left (Select)
      Tab
      Until (!FindStatusFlag)

      John R.
    • Show all 3 messages in this topic