Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Peter Jamieson
 
Posts: n/a
Default

I don't think you will be able to do this using fields for the reasons you
have already discovered.

I think your options include:
a. do the merge and postprocess the output to remove blank table rows. You
could probably do that with a relatively simple bit of VBA. However, if you
have to output directly to printer, e-mail or fax, it isn't an option.
b. use the "mailmerge events" I suggested. That also requires VBA and I can
tell you that it's likely to be a lot harder to get right than (a).
c. "roll your own" merge using (say) VBA. That's more work than either (a)
or (b) but in principle gives you a lot more control.
d. redesign your data source so that a field-based solution (or some other
solution) becomes feasible. In this case, it would need to be the kind of
solution where you have 100 rows per form, each one containing a single
field, rather than 100 fields per form, all in one row. One possible
approach is to have
- a merge data source that contained one record for each "form"
- a second data file of some kind that has as many rows as are required to
generate the table for that form.
- use a DATABASE field in your mail merge main document to get the data
from the second file.

It's difficult to tell which of these approaches, if any, would help you.
Personally I would prefer it if the "FIELD language" was more powerful and
let you do this kind of stuff more easily without having to resort to
procedural code, but it isn't.

Peter Jamieson
"Larry Cohen via OfficeKB.com" wrote in message
...
I have a requirement to insert mergefields in a "form" that can have from 1
to about 100 rows. I created a table with 100 mergefields, but if the
mergefields from, lets say, 10-100 are blank, then 1-9 look fine, but 10-
100 are blank, and don't roll up.
I got around this by making my table only 2 rows deep, with the first row
having the "labels" and using IF...THEN...ELSE for all the 100
mergefields.
I insert two blank lines if the mergefield is not null, so a blank line
separates the non-blank entries, and all the blanks roll up.
While that looks ok, it does not look as good as a fully formed table in
the merge doc. It also means I can not merge other data on the same row
without potential problems with blank entries for the second field, and
possible wraping of data in a cell - which would look terrible in a two
row
table.
So I wondered if there was any way to delete the unused rows in the table
in the merge doc if there was no data in any cell on the row.

Thanks

--
Message posted via http://www.officekb.com



 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table in a Form HiDbLevel Tables 12 February 27th 06 12:59 PM
Modifying a macro in a global template Bob S New Users 4 March 14th 05 05:43 PM
Running document macro from server Intravler New Users 0 March 4th 05 04:33 AM
Save As is not working due to macro security settings Craig Meritz Microsoft Word Help 1 December 16th 04 03:53 AM
2000 to 2002 macro and "Could not open macro storage" Art Farrell Mailmerge 1 December 6th 04 12:40 PM


All times are GMT +1. The time now is 02:41 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"