![]() |
|
#2
|
|||
|
|||
|
Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim arrParts() As String
Dim oRng As Word.Range
arrParts = Split(ActiveDocument.Range.Text, "State of Florida")
If UBound(arrParts) > 0 Then
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "STATE TAX"
.Replacement.Text = "0.00"
.Execute Replace:=wdReplaceAll
End With
End If
lbl_Exit:
Exit Sub
End Sub
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBA Word - Find & Apply Styles to Specific Words - Using Case Statement | jc491 | Word VBA | 17 | 12-26-2015 12:25 PM |
| Replacing the 2nd or 3rd instance of Text | wdillon2 | Word VBA | 2 | 05-13-2015 10:21 PM |
Problem replacing text.
|
piritzo | Word | 2 | 06-22-2013 12:50 AM |
Help with replacing text with wildcards
|
sbatson5 | Word | 2 | 04-13-2012 03:49 AM |
| Replacing / editting text | LisaC | Word | 0 | 02-25-2010 03:40 AM |