mas mau tanya nih,
mengenai kode vba di excel 2010 untuk mengganti text dalam "( )"
menjadi *italic
*atau miring.
contoh yang di iginkan seperti ini :
cleaning service ( petugas kebersihan ) --> yang di inginkan
menjadi cleaning service ( *petugas kebersihan* )
saya sudah pake script ini.
tapi runtime error 450 terus. kira kira problem solvng nya apa ya ?
terimaksih
aditia
Sub Find_and_Italicise()
'
' Macro recorded by Bird_FAT
' This macro uses the wildcard '*' to look for text
' between to underscores, then italicises the text.
' The While/Wend statement at the end causes it to
' loop until it reaches the end of the document.
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "(*)"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
While Selection.Find.Execute
Selection.Font.Italic = wdToggle
Wend
End Sub