M
mailman
Window XP home , Office 97
I have to change that {4T 184.1} for that {Testimonies for the Church Vol. 4, 184.1} and this is the macro that does it for me but there is a problem because sometimes in other document to change there is no bracket in the front and the back of course so how to retrace to the first number value whatever it is and be sure it will not grab some text before or after. Thoses book references are inserted at the end of other text like so.
and Israel would have been spared the untold woe of fire and carnage and famine. {4Testimonies for the Church Vol. 1, 184.1}
I would like also to make sure that if it does not find the searched text that it stop andpop a message to tell it to the person Thanks
Sub T()
'
' T Macro
' Macro recorded 05/23/04 by Gilles Boudreau
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "T "
.Replacement.Text = "Testimonies for the Church Vol. 1, "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceOne
Selection.MoveRight Unit:=wdWord, Count:=3, Extend:=wdExtend
With Selection.Font
.Name = "Arial"
.Size = 13
.Italic = True
.ColorIndex = wdViolet
End With
Selection.EndKey Unit:=wdLine
Selection.MoveLeft Unit:=wdWord, Count:=12
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.Font
.Name = "Arial"
.Size = 13
.Italic = True
.ColorIndex = wdViolet
End With
Selection.Copy
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=6
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Paste
Selection.EndKey Unit:=wdLine
End Sub
I have to change that {4T 184.1} for that {Testimonies for the Church Vol. 4, 184.1} and this is the macro that does it for me but there is a problem because sometimes in other document to change there is no bracket in the front and the back of course so how to retrace to the first number value whatever it is and be sure it will not grab some text before or after. Thoses book references are inserted at the end of other text like so.
and Israel would have been spared the untold woe of fire and carnage and famine. {4Testimonies for the Church Vol. 1, 184.1}
I would like also to make sure that if it does not find the searched text that it stop andpop a message to tell it to the person Thanks
Sub T()
'
' T Macro
' Macro recorded 05/23/04 by Gilles Boudreau
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "T "
.Replacement.Text = "Testimonies for the Church Vol. 1, "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceOne
Selection.MoveRight Unit:=wdWord, Count:=3, Extend:=wdExtend
With Selection.Font
.Name = "Arial"
.Size = 13
.Italic = True
.ColorIndex = wdViolet
End With
Selection.EndKey Unit:=wdLine
Selection.MoveLeft Unit:=wdWord, Count:=12
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.Font
.Name = "Arial"
.Size = 13
.Italic = True
.ColorIndex = wdViolet
End With
Selection.Copy
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=6
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Paste
Selection.EndKey Unit:=wdLine
End Sub