View Single Post
 
Old 02-01-2019, 08:17 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,161
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Oh, I hadn't seen the attachment because I was using a mobile phone to view this some of the time. Try this version of the code
Code:
Sub TopiaFormat()
  Dim Para As Paragraph, Rng As Range, i As Integer
  
  ActiveDocument.ConvertNumbersToText

  For Each Para In ActiveDocument.Range.Paragraphs
    With Para.Range
      If .Text Like "?" & vbTab & "*" Then
        Set Rng = .Duplicate
        With Rng
          .End = .Start + 2
          .Text = "[*]" & vbTab
        End With
      End If
    End With
  Next

  With Selection.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Wrap = wdFindContinue
    .Forward = True
    
    .Text = "^233"
    .Replacement.Text = " - "
    .Execute Replace:=wdReplaceAll
    
    .Text = "ï"
    .Replacement.Text = "[*]"
    .Execute Replace:=wdReplaceAll
    
    .Text = "[*]^w"
    .Execute Replace:=wdReplaceAll
    
    .Text = "^p^p"
    .Replacement.Text = "^p^p^p"
    .Execute Replace:=wdReplaceAll
  End With

  For i = ActiveDocument.Hyperlinks.Count To 1 Step -1
    With ActiveDocument.Hyperlinks(i)
      .Range.Text = "[>" & .Address & "|" & .TextToDisplay & "]"
    End With
  Next
  
  ActiveDocument.Range.Font.Reset
  ActiveDocument.Range.Style = "Normal"
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote