Hi,
I want to replace specific text font name to other font name. I am trying to write a macro for it. but font name not working here. please help and give a suggestion for it. sorry for bad grammer.
Sub ReplaceTextWithFormatting()
For Each myStoryRange In ActiveDocument.StoryRanges
With myStoryRange.Find
.ClearFormatting
.Text = "wiki"
.Font.Name = "Arial"
.Replacement.ClearFormatting
.Replacement.Text = "Romil"
.Wrap = wdFindContinue
.MatchCase = True
.MatchWholeWord = True
.ClearFormatting
.Replacement.Font.Name = "Kokila"
.Replacement.Font.Bold = True
.Replacement.Font.Size = 18
.Replacement.Font.Subscript = True
.Replacement.Font.Color = RGB(0, 0, 255)
.Execute Replace:=wdReplaceAll
End With
Next myStoryRange
End Sub