Results 1 to 11 of 11
  1. #1
    Lounger
    Join Date
    Dec 2002
    Location
    Hull, Yorkshire, England
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Blank line suppression (Word 2002)

    Hello Fellow Loungers,

    Here is some information that I have recently obtained that may be of use to someone.

    I recently experienced a problem with Word 2002 where if a mail merge involved merge fields contained within the "true text" or the "false text" parts of an "IF" field, and one or more of the same fields in the data source were empty, then the resulting blank lines would not be suppressed by the merge. This behaviour differs from that of Word 97 and Word 2000 where blank lines can be suppressed even within the results of an "IF" field.

    I logged a call with Microsoft Support regarding this behaviour and I have now received a response. Here it is.

    The response is to the effect that the mail merge element was largely re-written for Word 2002, that it does indeed behave in the new way, that there are no plans to alter this behaviour, and that the Beta version of the "post-2002" version of Word behaves in the same (new) way.

    Oh, well. :-((

    There are workarounds for this problem but I won't detail any of those in this posting -I'll leave that to the experts. (If anyone currently needs a workaround I can suggest one that has worked for me). This current posting is mainly to inform people of the information that has come to me from Microsoft.

    An example of the problem follows for anyone interested.

    My test data source is like this:

    AddressLine1,AddressLine2,AddressLine3,AddressLine 4
    A,B,,D

    (i.e.) AddressLine3 has no data.

    My test main document is like this:

    { MERGEFIELD "AddressLine1" }
    { MERGEFIELD "AddressLine2" }
    { MERGEFIELD "AddressLine3" }
    { MERGEFIELD "AddressLine4" }

    { IF "{ MERGEFIELD "AddressLine1" }"<>""
    "{ MERGEFIELD "AddressLine1" }
    { MERGEFIELD "AddressLine2" }
    { MERGEFIELD "AddressLine3" }
    { MERGEFIELD "AddressLine4" }" ""* MERGEFORMAT }

    (The lines are terminated with paragraph marks.
    The set of fields outside of the "IF" statement is my "control" group.)

    When I perform the merge I get

    A
    B
    D

    A
    B

    D

    That is, if the fields are "standalone" the blank line is suppressed, but if the fields are the "true text" or the "false text" of an "IF" field the blank line isn't suppressed.


    Cheers.

    Ed

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Blank line suppression (Word 2002)

    Hi Ed,
    You'll find an interesting discussion about this issue in <post#= 198744>post 198744</post#> and <post#= 198153>post 198153</post#> and their related threads.
    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    Lounger
    Join Date
    Dec 2002
    Location
    Hull, Yorkshire, England
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank line suppression (Word 2002)

    Hi Macropod,

    Thanks for the pointers. Sorry about the delay in replying - for a bunch of reasons I have not had much Internet access recently.

    Cheers.

    Ed

  4. #4
    Lounger
    Join Date
    Jul 2002
    Location
    Wellington, North Island, New Zealand
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank line suppression (Word 2002)

    Hi Ed,

    I was so pleased to read your mail. I found the same problem as well and mailed about it a few months ago but no-one replied (or maybe I wasn't clear in my question).

    We have VB software that integrates with Word via Mergefields, and now in Word 2002 we don't get the "suppress blank lines" feature which has resulted in the address blocks containing blank lines.

    Please can you tell me the work around. This is driving me crazy trying to come up with a solution.

    I know MS have changed the way Word 2002 behaves but I have not been able to find anyone who will help me fix this problem that has now manifested itself.

    Thanks in anticipation, you are (potencially) a life saver.

    JOTO

  5. #5
    New Lounger
    Join Date
    Jun 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank line suppression (Word 2002)

    The only way at present to suppress the blank line is to use an IF statement per merge field and included the return within the merge field, hence if the merge field is blank, you will have no blank lines.

    If merge field ="merge filed""merge Filed ( + return)"""


    If your merge fileds exists Then insert with return else do nothing

    Hope this helps

    Mike

  6. #6
    Lounger
    Join Date
    Dec 2002
    Location
    Hull, Yorkshire, England
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank line suppression (Word 2002)

    Hi JOTO,

    I'm posting the workaround as a separate reply but you might be interested in this.

    The reply that macropod posted to my original mailing contains some links to other postings concerning blank-line suppression issues. Because I have had only occasional access to the Internet recently I have not had a chance yet to study these. It may be that they will provide you with a better solution than the workaround I am going to suggest here. I don

  7. #7
    Lounger
    Join Date
    Dec 2002
    Location
    Hull, Yorkshire, England
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank line suppression (Word 2002)

    Hi JOTO,

    Ok. Now to the workaround. Basically I'm going to say what Mike said in his reply - I'm just going to take longer to say it. In what follows, the braces ("{" and "}" ) are the ones you get when you insert fields through the menus or when you create fields manually by pressing CTRL-F9, not the characters that you get by pressing the curly bracket keys on the keyboard. Also, when I use the term "truetext" I mean the part of your IF field that tells Word what to do if the condition you're testing is true, and when I use the term "falsetext" I mean the part of your IF field that tells Word what to do if the condition you're testing is false.

    Let

  8. #8
    Lounger
    Join Date
    Jul 2002
    Location
    Wellington, North Island, New Zealand
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank line suppression (Word 2002)

    Hello Ed,

    Thanks for the detailed reply, it is interesting and will try out the fix in any "If" statements.

    However, my main problem is more basic than the use of If statements. If you merge to Word via somekind of 3rd party VB software then the 'suppress blank lines' feature does not work in any mergefield.

    For example, say I have the following address block:

    { MERGEFIELD "AddressLine1" }
    { MERGEFIELD "AddressLine2" }
    { MERGEFIELD "AddressLine3" }
    { MERGEFIELD "AddressLine4" } etc.

    The mergefileds are all stand alone and not in an "If" statement. When I merge and some of the data is missing I get blank lines in my address, as in your example you explained earlier. Exactly the same document will work fine in 97 and 2000.

    I don't use the Mail Merge Helper as I don't have access to the data source at the time the documents are created. All my merge fields are entered manually or via a macro. So documents are not saved as mail merge docs.

    The fix I need should allow the merge to tell Word to suppress blank lines. As I have over 3,000 documents with this type of address block in I can't really re-visit each one and change the mergefield itself. I am really hoping that it will not come to that.

    I agree that the people who write this software are not users of it or this fundamental change would never have been incorporated. I'm sure others must have found it a big problem.

    Anyway, I hope you may have some ideas. Thanks for taking the time to reply earlier. Have a wonderful Christmas,

    JOTO

  9. #9
    Lounger
    Join Date
    Dec 2002
    Location
    Hull, Yorkshire, England
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank line suppression (Word 2002)

    Hi JOTO,

    I

  10. #10
    Lounger
    Join Date
    Jul 2002
    Location
    Wellington, North Island, New Zealand
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank line suppression (Word 2002)

    Hi Ed,

    Thank you so much for all the help you have given and the detailed responses. I have tried your fix and it works fine. I have put the address block in an "If statement" and it now will supress the lines with the carriage return built into the statement.

    The only down side is that I now have to do that for all the docs. I have been tasked with changing the most important ones and then we may get an external consultant to complete the rest for us. It should be easy if I save all the various address blocks as Autotext entries.

    Anyway, thanks for the help, my boss is very impressed it is now solved and we can run with Word 2002.

    Have a great Christmas and New Year.

    Best wishes, JOTO <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>

  11. #11
    Lounger
    Join Date
    Dec 2002
    Location
    Hull, Yorkshire, England
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank line suppression (Word 2002)

    Hi JOTO,

    You're welcome.

    Regards.

    Ed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •