locked
Suppress Blank Space RRS feed

  • Question

  • Hello I really need help in word document

    i have the following condition

    {if <mergefield>="ABC""I am inserting table""N/A"}

    in the above condition i am inserting table if the merge field is "ABC". But on the output i can see a blank space(Paragraph break) under the table. How do i remove the blank space in  if clause

    Saturday, April 29, 2017 3:47 PM

All replies

  • What you normally get when you insert a table (whether you are using an IF field or not) is a paragraph mark before the table. When your IF field is the only thing in a paragraph, the paragraph mark you see below the table is just that paragraph mark, not something inserted by the field.

    So if for example you want to put some text on the line immediately below the table, you can use

    {if <mergefield>="ABC""I am inserting table""N/A"}the text you want

    Just guessing here, but if what you want is to follow the table inserted by the IF field with another table in such a way that they look like a single table, the problem is not the paragraph mark after the first table, it's the paragraph mark before the second table. In that case you may be able to eliminate the gap by selecting the paragraph mark before the second table and setting its font to Hidden.


    Peter Jamieson

    Sunday, April 30, 2017 12:20 AM
  • A blank space after the table will be created by the paragraph you anchored the field to. If that's an empty paragraph, move the paragraph break so that it occurs between 'N'A' and '"',changing the layout from:

    {IF{MERGEFIELD MyField}= "ABC" "¶
    Inserted Table
    " "N/A"}¶
    or:
    {IF«MyField»= "ABC" "¶
    Inserted Table
    " "N/A"}¶

    to:

    {IF{MERGEFIELD MyField}= "ABC" "¶
    Inserted Table
    " "N/A¶
    "}
    or:
    {IF«MyField»= "ABC" "¶
    Inserted Table
    " "N/A¶
    "}

    This will anchor the field to the following paragraph but will preserve the paragraph break required for your 'N/A' result.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Sunday, April 30, 2017 5:42 AM