S
songq
I want to split a paragraph into several parts,with each
part has uniform font.so i use find and replace to do this.
'set R = range of one paragraph
Dim EndPoint As Integer
EndPoint = R.End
Do While(R.Start<R.End)
With R.Find
.ClearFormatting
.Font.color = R.Characters(1).Font.color
.Font.name = R.Characters(1).Font.name
.Font.Bold = R.Characters(1).Font.Bold
.Font.Italic = R.Characters(1).Font.Italic
.Font.Size = R.Characters(1).Font.Size
.text = ""
.Replacement.text = ""
.Format = True
.Forward = True
.Execute
End With
Debug.Print R.text
R.SetRange R.End,EndPoint
Loop
but it doesn't work properly,and who can tell me what's
wrong with my program.Thank you very much!
part has uniform font.so i use find and replace to do this.
'set R = range of one paragraph
Dim EndPoint As Integer
EndPoint = R.End
Do While(R.Start<R.End)
With R.Find
.ClearFormatting
.Font.color = R.Characters(1).Font.color
.Font.name = R.Characters(1).Font.name
.Font.Bold = R.Characters(1).Font.Bold
.Font.Italic = R.Characters(1).Font.Italic
.Font.Size = R.Characters(1).Font.Size
.text = ""
.Replacement.text = ""
.Format = True
.Forward = True
.Execute
End With
Debug.Print R.text
R.SetRange R.End,EndPoint
Loop
but it doesn't work properly,and who can tell me what's
wrong with my program.Thank you very much!