![]() |
|
#1
|
||||
|
||||
![]()
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 |
#2
|
|||
|
|||
![]()
That one ran without issue. Thanks for your ongoing support, Andrew.
Hard to imagine, but this small bit of code will save my company something like €10k/year. Amazing what is possible with just a bit of automation. Thanks again. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Replacing a comment with underline or other formatting (or adding that formatting to commented text) | paulkaye | Word | 4 | 05-16-2016 05:38 AM |
![]() |
Instructor Mark | Word | 4 | 04-06-2016 01:32 PM |
![]() |
BrianSvanvik | Word | 2 | 09-04-2015 01:20 PM |
Find and Replace, Formatting, Formatting Formula | kjxavier | Word | 1 | 07-04-2014 09:11 AM |
Formatting contents after Tab of continuous lines or formatting specific area of word | pawii | Word | 1 | 05-12-2014 05:24 AM |