I'm working with a text-based document, with every line as a separate
paragraph. Each line is 80 characters monospaced from start to paragraph
mark. This first thing I do is search for a specific character in the first
line; if it's there, then the first three lines/paragraphs are a
header/footer. I set this to a range, capture the Range.Text into a
strHeader, and delete it.

Because of the way this doc is spit out of the database, this header/footer
is repeated everywhere there was *supposed* to be a page break. So I tried:
RangeDoc.Find. Execute _
FindText:= strHeader & "^p" & strHeader, _
ReplaceWith:="^m", Replace:=wdReplaceAll

and got an error: "String parameter too long".

Any advice on making this work? Are the actual number of characters too
much for a string? Too many lines?paragraphs? Word is finicky and doesn't
like me today?

Ed

Re: Error: "string parameter too long"? by Peter

Peter
Fri Feb 20 15:29:30 CST 2004

Hi Ed

The Find objects Text property is limited to 255 characters, you're obviously
exceeding that.

HTH + Cheers - Peter

"Ed" <ed_millis@removethis.hotmail.com> wrote in
news:uWj2hn89DHA.3648@TK2MSFTNGP11.phx.gbl:

> I'm working with a text-based document, with every line as a separate
> paragraph. Each line is 80 characters monospaced from start to
> paragraph mark. This first thing I do is search for a specific
> character in the first line; if it's there, then the first three
> lines/paragraphs are a header/footer. I set this to a range, capture
> the Range.Text into a strHeader, and delete it.
>
> Because of the way this doc is spit out of the database, this
> header/footer is repeated everywhere there was *supposed* to be a page
> break. So I tried: RangeDoc.Find. Execute _
> FindText:= strHeader & "^p" & strHeader, _
> ReplaceWith:="^m", Replace:=wdReplaceAll
>
> and got an error: "String parameter too long".
>
> Any advice on making this work? Are the actual number of characters too
> much for a string? Too many lines?paragraphs? Word is finicky and
> doesn't like me today?
>
> Ed
>
>
>


Re: Error: "string parameter too long"? by Ed

Ed
Fri Feb 20 15:53:54 CST 2004

Ah - it's not too long for a String, but it's too much to stuff into Text.
Okay, that makes sense. Time for Plan B! 8>)

Thanks once again, Peter.
Ed

"Peter Hewett" <Nospam@xtra.co.nz> wrote in message
news:Xns94966AB6CFD63Iwlpth@207.46.248.16...
> Hi Ed
>
> The Find objects Text property is limited to 255 characters, you're
obviously
> exceeding that.
>
> HTH + Cheers - Peter
>
> "Ed" <ed_millis@removethis.hotmail.com> wrote in
> news:uWj2hn89DHA.3648@TK2MSFTNGP11.phx.gbl:
>
> > I'm working with a text-based document, with every line as a separate
> > paragraph. Each line is 80 characters monospaced from start to
> > paragraph mark. This first thing I do is search for a specific
> > character in the first line; if it's there, then the first three
> > lines/paragraphs are a header/footer. I set this to a range, capture
> > the Range.Text into a strHeader, and delete it.
> >
> > Because of the way this doc is spit out of the database, this
> > header/footer is repeated everywhere there was *supposed* to be a page
> > break. So I tried: RangeDoc.Find. Execute _
> > FindText:= strHeader & "^p" & strHeader, _
> > ReplaceWith:="^m", Replace:=wdReplaceAll
> >
> > and got an error: "String parameter too long".
> >
> > Any advice on making this work? Are the actual number of characters too
> > much for a string? Too many lines?paragraphs? Word is finicky and
> > doesn't like me today?
> >
> > Ed
> >
> >
> >
>