Hello. There is short story with dialogues. These dialogues has
formated of list marked (the dash). I need to format these dialogues
into other style (Normal) and insert before each dialogues the dash,
as is it was previously with list. I wrote the code, but it replace
not all entries. That code:
Sub listChange()
'Change list format on Normal text with the dash
Dim List1 As Style
Dim List2 As Style
Set List1 = ActiveDocument.Styles("MarkList")
Set List2 = ActiveDocument.Styles("Normal")
With Selection.Find
.ClearFormatting
.Style = List1
.Replacement.ClearFormatting
.Replacement.Style = List2
.Text = ""
.Replacement.Text = "^+^s^&"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.Execute Replace:=wdReplaceAll
End With
End Sub
And here (http://rapidshare.com/files/96671459/list.doc.html) you can
download the file with sample dialogues.
Thank you very much.

RE: How to change list for normal text and add dash? by JeanGuyMarcil

JeanGuyMarcil
Mon Mar 03 06:05:01 PST 2008

"avkokin" wrote:

> Hello. There is short story with dialogues. These dialogues has
> formated of list marked (the dash). I need to format these dialogues
> into other style (Normal) and insert before each dialogues the dash,
> as is it was previously with list. I wrote the code, but it replace
> not all entries. That code:

Which entries get skipped? Anything in common for those skipped passages?
(Sorry but I am at work and I cannot use Rapidshare here...)

Re: How to change list for normal text and add dash? by avkokin

avkokin
Mon Mar 03 23:07:02 PST 2008

On 3 =CD=C1=D2, 12:23, avkokin <avko...@gmail.com> wrote:
> Hello. There is short story with dialogues. These dialogues has
> formated of list marked (the dash). I need to format these dialogues
> into other style (Normal) and insert before each dialogues the dash,
> as is it was previously with list. I wrote the code, but it replace
> not all entries. That code:
> Sub listChange()
> 'Change list format on Normal text with the dash
> Dim List1 As Style
> Dim List2 As Style
> Set List1 =3D ActiveDocument.Styles("MarkList")
> Set List2 =3D ActiveDocument.Styles("Normal")
> With Selection.Find
> .ClearFormatting
> .Style =3D List1
> .Replacement.ClearFormatting
> .Replacement.Style =3D List2
> .Text =3D ""
> .Replacement.Text =3D "^+^s^&"
> .Forward =3D True
> .Wrap =3D wdFindContinue
> .Format =3D True
> .Execute Replace:=3DwdReplaceAll
> End With
> End Sub
> And here (http://rapidshare.com/files/96671459/list.doc.html) you can
> download the file with sample dialogues.
> Thank you very much.

Hello. After use of this macro it change only first entry of list but
it skipped next entries of list. You can download this file also from
here (http://www.box.net/shared/2blerch8gc). Thank you very much.

Re: How to change list for normal text and add dash? by avkokin

avkokin
Tue Mar 04 00:37:40 PST 2008

On 4 =D0=BC=D0=B0=D1=80, 10:07, avkokin <avko...@gmail.com> wrote:
> On 3 =C3=8D=C3=81=C3=92, 12:23, avkokin <avko...@gmail.com> wrote:
>
>
>
> > Hello. There is short story with dialogues. These dialogues has
> > formated of list marked (the dash). I need to format these dialogues
> > into other style (Normal) and insert before each dialogues the dash,
> > as is it was previously with list. I wrote the code, but it replace
> > not all entries. That code:
> > Sub listChange()
> > 'Change list format on Normal text with the dash
> > Dim List1 As Style
> > Dim List2 As Style
> > Set List1 =3D ActiveDocument.Styles("MarkList")
> > Set List2 =3D ActiveDocument.Styles("Normal")
> > With Selection.Find
> > .ClearFormatting
> > .Style =3D List1
> > .Replacement.ClearFormatting
> > .Replacement.Style =3D List2
> > .Text =3D ""
> > .Replacement.Text =3D "^+^s^&"
> > .Forward =3D True
> > .Wrap =3D wdFindContinue
> > .Format =3D True
> > .Execute Replace:=3DwdReplaceAll
> > End With
> > End Sub
> > And here (http://rapidshare.com/files/96671459/list.doc.html) you can
> > download the file with sample dialogues.
> > Thank you very much.
>
> Hello. After use of this macro it change only first entry of list but
> it skipped next entries of list. You can download this file also from
> here (http://www.box.net/shared/2blerch8gc). Thank you very much.

Hello there. I decided my question with help of the cycle. I added:
For Each List1 In ActiveDocument.Styles
Selection.Find.Execute Replace:=3DwdReplaceOne
Next List1
Thank you. But I not understand, why my early code is not working.