Tema: Re: klausimas del excelio ir .xml
Autorius: saimhe
Data: 2011-09-14 14:41:35
> su funkcija "Find and Replace" galima daryti tik po viena raide, kas uzima daug laiko...

  Pasidaryti po makrosą kiekvienai raidei. Pas mane panašiam reikalui, worde,
yra taip:


Sub MakePlainAscii()
    With Selection.Find
        .ClearFormatting
        .Wrap = Word.WdFindWrap.wdFindContinue
        .Forward = True

        Do
            .Execute Replace:=wdReplaceAll, FindText:=ChrW(8220), ReplaceWith:=""""
        Loop While .Found
        Do
            .Execute Replace:=wdReplaceAll, FindText:=ChrW(8221), ReplaceWith:=""""
        Loop While .Found
        Do
            .Execute Replace:=wdReplaceAll, FindText:=ChrW(8222), ReplaceWith:=""""
        Loop While .Found
        Do
            .Execute Replace:=wdReplaceAll, FindText:=ChrW(171), ReplaceWith:=""""
        Loop While .Found
        Do
            .Execute Replace:=wdReplaceAll, FindText:=ChrW(187), ReplaceWith:=""""
        Loop While .Found
        Do
            .Execute Replace:=wdReplaceAll, FindText:=ChrW(2018), ReplaceWith:="'"
        Loop While .Found
        Do
            .Execute Replace:=wdReplaceAll, FindText:=ChrW(2019), ReplaceWith:="'"
        Loop While .Found

    End With
End Sub

-- 
  saimhe