how do i found italics word from my document
hello frnds,
i have a word document i have to find italics word from my document, how can i do it ???
i have a MSWORD 2003 and .NET 2.0
i want to find the italics sapces also and make them Normal
font.
any hint ??? example ???
thankx in advance
koolprasad2003:)
Re: how do i found italics word from my document
you can loop through every character in the document and check if font.italic = true, or you can use the word find method to find italic font strings, which is probably the better option
Re: how do i found italics word from my document
You can Record a Macro and see how Word does it. :)
Code:
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Font.Italic = True
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Bold = False
.Italic = False
End With
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Re: how do i found italics word from my document
Thankx for reply robdog,
but i just want to convert my black sapces to Normal font.
does the above code works fine ???
how can i remove my blank spaces if they are italics ???
any hint ???
thankx in advance
koolprasad2003:)
Re: how do i found italics word from my document
Just change your macro. Record one like I linked you to and do your task as you wish.