View Single Post
  #11   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Remove blank lines from merge form


Yes you need the quotes where they are shown; and the new lines where they
are shown. Enter everything from the keyboard using CTRL+F9 for the field
delimiter brackets {}. Change the numbers 1 to 29 for the names of the
appropriate fields. http://www.gmayor.com/formatting_word_fields.htm may
help, but equally may confuse you more.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dvinechild wrote:
Hi Again,
I seem to still be having some troubles with this. It's a bit more
with writing the correct formula and want to make sure that I need
quotation marks were stated below, and/or the term mergefield as
shown. It hasn't quite worked out correctly. If you know of online
instructions as well, I'll be more than happy to refer to those as
well.
Justis

"Graham Mayor" wrote:

If you put all the 29 conditional fields on the same line without a
space between them and use the format Peter suggested i.e.

{ IF "{ MERGEFIELD 1 }" = "Y" "Runs & Shifts
" "" }{ IF "{ MERGEFIELD 2 }" = "Y" "The next thing
" "" }and so on up to Mergefield 29!
then there should be no blank lines. The new line is only created
when there is a match.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dvinechild wrote:
Peter, this is great information. We're getting warmer. I should
have clarified that there are 29 different columns of data that can
feed into this area, not just one out of 29. So, we could have a
combination of usually up to 5 different descriptions out of the
possible 29. When setting up the form, I'm trying to set each field
and if there is data in any of the 29 data fields that will
populate. What it ends up looking like is something like this:

Runs & Shift
Runs

Engine Seized
(notice the blank line where that data field did not have any data)
I'm looking to only have the data that applies appear and in
consecutive order with no blank lines.

(your previous formula is helpful though!)
If need be we can discuss offline and later post the answer.

"Peter Jamieson" wrote:

This line should be removed if Condition_Concerns is blank

{MERGEFIELD Condition_Concerns\*Caps\b "Condition Concerns
-"\*MERGEFORMAT

Is that what is actually happening?

For this one,

{IF {A=Y "Runs & Shifts" " "} }

I guess you must be using something like

{ IF "{ MERGEFIELD A }" = "Y" "Runs & Shifts" "" }

You either need

{ IF "{ MERGEFIELD A }" = "Y" "Runs & Shifts
" "" }{ IF "{ MERGEFIELD B }" = "Y" "The next thing
" "" }and so on

or if you include a blank column called "blank" in your Excel
sheet, you can probably use

{ IF "{ MERGEFIELD A }" = "Y" "Runs & Shifts" "" }{ MERGEFIELD
blank }

(because it takes a blank field on a line to suppress the line, and
blanks generated by IF fields "don't count"

Peter Jamieson

"Dvinechild" wrote in
message ...
Fields under Specification section a
{MERGEFIELD Condition_Concerns\*Caps\b "Condition Concerns
-"\*MERGEFORMAT

Under Motor Condition I'm using:
{IF {A=Y "Runs & Shifts" " "} }

The proper data appears, but I'm just having problems with the
line remaining if there is no data to pull from the data source
field. Thanks for
your patience.

"Peter Jamieson" wrote:

Sorry, I meant the MERGEFIELD fields you are using in Word, e.g.

{ IF { MERGEFIELD myfield } = "" "" "{ MERGEFIELD myfield }" }

or whatever.

Peter Jamieson

"Dvinechild" wrote in
message
...
Here's a sneak peek:
MOTOR SPECIFICATIONS
Year
HP
Cylinders
Compression (dry test)
Drive Make
Hours
Prop
Trolling Motor

MOTOR CONDITION

They are within a simple table b/c i need the structure and
middle divider
to show as 2 columns when I cut/paste into eBay. Most fields
will populate
if
there is data in column in Excel. MergeFields with text before
and other
simple formatting.
-------------------------------------------------------

"Peter Jamieson" wrote:

Can you give us an example of how your fields are currently set
up?

Peter Jamieson

"Dvinechild" wrote in
message
news I'm creating a form from an Excel data source. A section under
'Motor
Condition' has 29 possible fields to populate. I'm trying to
set these
up
as
header, then a 'Y' or blank as it applies per item. I got as
far as an
IF
function, but unlike regular merge fields with blank data
reacting by
shrinking up a line if nothing is there, it keeps a hard enter
or line.
Due
to the nature of the form, I need the extra line gone (results
in 29 blank
lines and boosting a longer form than necessary). The only
reason I prefer
'Y' data is the hassel of typing in actual text and this needs
to go faster
for data entry. This form gets cut/pasted into an eBay
description area.
Your
assistnace is appreciated.