
Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Hi, Helmut.
> Hi Ed,
>
> try putting a chr(12) it the string.
>
> But there is more to it.
But only if I want something other than a plain page break?
I do not want a section brealk, just a page break. So I can use
Replace(strDocText, strBreakText, strBreakText & Chr(12),
1,-1,vbTextCompare) ???
Ed
> See:http://tinyurl.com/244hwp
>
[quoted text clipped - 5 lines]
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"
Helmut Weber - 06 Apr 2007 09:27 GMT
Hi Ed,
>But only if I want something other than a plain page break?
yes, seems so.
Tested with:
Sub Macro4()
ActiveDocument.Range.Text = _
String(100, "x") & Chr(12) & String(100, "y")
End Sub

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Klaus Linke - 08 Apr 2007 17:54 GMT
It might work well, but I feel a bit queasy about it.
Especially since ^12 doubles as page break and section break.
Maybe better to make a more elaborate macro using
.InsertBreak(Type:=wdPageBreak) between the individual strings ...
Regards,
Klaus
> Hi Ed,
>
[quoted text clipped - 8 lines]
> String(100, "x") & Chr(12) & String(100, "y")
> End Sub
Helmut Weber - 08 Apr 2007 18:08 GMT
Hi Klaus,
>It might work well, but I feel a bit queasy about it.
>Especially since ^12 doubles as page break and section break.
indeed, though after executing
ActiveDocument.Range.Text = _
String(100, "x") & Chr(12) & String(100, "y")
there is no section break to be found.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Klaus Linke - 08 Apr 2007 21:04 GMT
You're probably right. I have frequently inserted text containing ^13 for
paragraph marks myself (even though I know better than to insert ^13 with a
Find/Replace), and never saw problems.
:-) Klaus
> Hi Klaus,
>
[quoted text clipped - 7 lines]
>
> there is no section break to be found.