E
Ed
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
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