Re: Delete single newline between tables by gordon(dot)bentleymix(at)gmail(dot)com>
gordon(dot)bentleymix(at)gmail(dot)com>
Tue Nov 27 15:06:01 PST 2007
Dan,
I'm afraid I don't understand. How can there be any risk of the users
modifying anything in the _template_ during the document creation process?
Surely this process is automated, and during this process the document
automation system has complete control over the content of the
document/template. And if not, the "magic formatting" solution cannot present
any more risk than the "blank line between tables" solution. If the users can
touch the template prior to the document being created from it, then wouldn't
they be able to do something to make a blank line between tables no longer
blank?
Not that it matters really. If you're happy with Helmut's (excellent and
obviously very usable) solution then run with it. I just thought I'd offer an
alternative that uses a bit less code - and therefore might be a bit easier
to understand and maintain (14 lines of code, 3 declared objects, 3 nested
'If' statements vs 4 lines of code, 1 declared object, 1 'If' statement). And
for really large documents, I'm sure that Russ's solution would be quicker
than either mine or Helmut's since using the Find method is undoubtedly more
efficient that cycling through the Paragraphs collection. (Plus it's just a
simple to understand and maintain - 1 declared object, no 'If' statements or
loops and an intuitively obvious 'With' statement.)
BTW, Russ: If I do run into a situation where performance becomes an issue,
I'll certainly keep your solution in mind. So far most of my docs have been
less than 20 pages, so speed hasn't become a problem. Thanks for the tip!
--
Cheers!
The Kiwi Koder
"Dan Neely" wrote:
>
> I don't like the magic formatting option. There's too much risk of it
> getting broken by an end user inserting boilerplate into the template
> being used by the generation tool, or fiddling with the formatting.