ismailyetim
Öğrenci
- Katılım
- 27 Mart 2009
- Mesajlar
- 11
- Reaksiyon puanı
- 0
- Puanları
- 0
merhaba dostlar, word xp'de "makro kaydet" seçeneğiyle bi makro kaydettim, ancak istediğimi yapmıyor. bir belgedeki belli renkli metinleri bulup, boşlukla değiştirmesini istedim (****-replace->more->format->font->font color'dan seçerek)
makroya (aşağıda metni mevcut) baktım, formattaki renk hiçbir yerde görünmüyor, dolayısıyla bulamıyor.
ne yapmam gerekli?
Sub XML2RTF()
'
' XML2RTF Macro
' Macro recorded 25.06.2009 by XXXXXXXXX
'
ActiveWindow.Next.Activate
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = "^t "
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = " ^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = "^p"
.Replacement.Text = "^l"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = "^t"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.MoveRight Unit:=wdWord, Count:=2, Extend:=wdExtend
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=3, Extend:=wdExtend
Selection.Copy
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "]]>"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
End Sub
makroya (aşağıda metni mevcut) baktım, formattaki renk hiçbir yerde görünmüyor, dolayısıyla bulamıyor.
ne yapmam gerekli?
Sub XML2RTF()
'
' XML2RTF Macro
' Macro recorded 25.06.2009 by XXXXXXXXX
'
ActiveWindow.Next.Activate
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "^t^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = "^t "
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = " ^t"
.Replacement.Text = "^t"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = "^p"
.Replacement.Text = "^l"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
With Selection.****
.Text = "^t"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.MoveRight Unit:=wdWord, Count:=2, Extend:=wdExtend
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=3, Extend:=wdExtend
Selection.Copy
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.****.ClearFormatting
Selection.****.Replacement.ClearFormatting
With Selection.****
.Text = "]]>"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.****.Execute Replace:=wdReplaceAll
End Sub