Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Lounger
    Join Date
    Mar 2006
    Location
    Emerald Hills, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am using data from a table to merge into a Word document directory format. When I do the merge, Word inserts a space wherever there is no data in a field. Can you please tell me how to get rid of the space? It ends up looking like this:

    Sequoia Healthcare District
    Hon. Mary Smith
    Hon. Jim Time
    Hon. Twit Pick
    Joe Jones

    (Since there was no title for Joe Jones, it puts a space before Joe but you can't see it because when I preview this, your system removes the space)

    Thank you so much for your help.

  2. #2
    3 Star Lounger
    Join Date
    Feb 2003
    Location
    England
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Not sure what version of Word you are using but only because I discovered this while trying to make some mail merge labels Post 793367 the same thing happens with my data base and I found out it could be to do with "Styles" you would think the "normal" style wouldn't have spaces, but not so....I have to select the style "no space" and that does the trick for me in getting rid of the blank lines, see here and scroll right the way down the article, dont know if this will help....meanwhile I struggle on with inserting a picture

    from the link:
    Note:
    Microsoft appears to have retained the default use of the 'normal' paragraph style to format tables; however, in Word 2007, the normal paragraph style has added spacing. This will result in extra spacing between the lines of text in tables. Word uses tables to create labels; however when those labels are created using the label tool the process is supposed to remove that extra spacing. In practice I find that it is not 100% reliable, but that is what is supposed to happen.

    The default style set also includes a standard 'No spacing' style which is what long standing Word users would have expected to have been the Normal style. Why Microsoft swapped these styles around I cannot say, but .....

    You can edit the Normal paragraph style to remove that spacing, just as you can edit any other style, and this will fix the issue for labels you create from the label tool (I would also rename the No Spacing style to Normal Spaced and add to it the spacing you have removed from the normal style); however ......

    Even more complicating is the fact that when mail merging labels, although the Normal style is used, extra padding is inserted as direct formatting, by the merge process, before each paragraph. This conspires to screw up the spacing of the paragraphs on your merged labels (see the right hand illustration immediately below this note).

    You must take this into consideration when adding merge fields and apply whatever formatting you need to give the presentation you require. One method would be to apply a non-spaced style to the first label before updating the labels. If you have modified the Normal style as mentioned above, you can simply re-apply that Normal style, which has the effect of removing the padding.

    The bottom line here is that if your labels have unwanted space, correction is a question of applying the correct formatting.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    [quote name='laineybirdy' post='793557' date='16-Sep-2009 10:01']I am using data from a table to merge into a Word document directory format. When I do the merge, Word inserts a space wherever there is no data in a field.
    ...
    (Since there was no title for Joe Jones, it puts a space before Joe but you can't see it because when I preview this, your system removes the space)[/quote]
    Second point first, you can preserve spacing by using [code][/code] around the text in that part of your post. (You can go back and do it now if you like, or keep this for future reference.)

    Word's merge feature allows you to use a variety of additional fields to test certain conditions, such as the {IF} field. To create an IF field, you can press Ctrl+F9 and type IF, and then copy and paste in your merge field as needed. For example, to avoid a blank space "between" a missing field and a field that is present, you can wrap it in an IF field as follows (note: air code, not from a working solution, change the merge field names to their real names):

    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}{FIRSTNAME} {LASTNAME}
    In English, that's "if the TITLE is not blank, insert the title followed by a space, otherwise insert nothing." Does that help?

  4. #4
    Lounger
    Join Date
    Mar 2006
    Location
    Emerald Hills, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='jscher2000' post='793605' date='16-Sep-2009 22:10']Second point first, you can preserve spacing by using [code][/code] around the text in that part of your post. (You can go back and do it now if you like, or keep this for future reference.)

    Word's merge feature allows you to use a variety of additional fields to test certain conditions, such as the {IF} field. To create an IF field, you can press Ctrl+F9 and type IF, and then copy and paste in your merge field as needed. For example, to avoid a blank space "between" a missing field and a field that is present, you can wrap it in an IF field as follows (note: air code, not from a working solution, change the merge field names to their real names):

    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}{FIRSTNAME} {LASTNAME}
    In English, that's "if the TITLE is not blank, insert the title followed by a space, otherwise insert nothing." Does that help?[/quote]


    Thank you! I will try using the code.

    I did try using the other code to add a space to my post but you can see what I got. I'm sure I didn't do it correctly - what am I missing?

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by laineybirdy' post='793613 View Post
    Second point first, you can preserve spacing by using [code][/code] around the text in that part of your post.
    I did try using the other code to add a space to my post but you can see what I got. I'm sure I didn't do it correctly - what am I missing?[/quote]
    Hmmm, it used to work on the old board software. Maybe it's not supported on this version? Hopefully we can find another way, or people will have to post images to show what they mean.

  6. #6
    Lounger
    Join Date
    Mar 2006
    Location
    Emerald Hills, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='jscher2000' post='793605' date='16-Sep-2009 22:10']Second point first, you can preserve spacing by using [code][/code] around the text in that part of your post. (You can go back and do it now if you like, or keep this for future reference.)

    Word's merge feature allows you to use a variety of additional fields to test certain conditions, such as the {IF} field. To create an IF field, you can press Ctrl+F9 and type IF, and then copy and paste in your merge field as needed. For example, to avoid a blank space "between" a missing field and a field that is present, you can wrap it in an IF field as follows (note: air code, not from a working solution, change the merge field names to their real names):

    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}{FIRSTNAME} {LASTNAME}
    In English, that's "if the TITLE is not blank, insert the title followed by a space, otherwise insert nothing." Does that help?[/quote]

    I tried using the above code and this is what I'm getting:
    Congressional Delegation
    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}
    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}
    Anna Eshoo
    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}
    Jackie Speier
    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}
    Assembly
    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}
    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}
    Jerry Hill
    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}
    Fiona Ma


    here is what I'm typing:

    «Category»
    Code:
    {IF{TITLE}<>"" "{TITLE} " ""}
    «FNAME» «LNAME» «POSITION» «PLACE»


    I've never done this code stuff before so I'm probably not doing it correctly (yikes!) You're very patient - thanks!

  7. #7
    Lounger
    Join Date
    Mar 2006
    Location
    Emerald Hills, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='jaystarter1' post='793567' date='16-Sep-2009 19:24']Not sure what version of Word you are using but only because I discovered this while trying to make some mail merge labels Post 793367 the same thing happens with my data base and I found out it could be to do with "Styles" you would think the "normal" style wouldn't have spaces, but not so....I have to select the style "no space" and that does the trick for me in getting rid of the blank lines, see here and scroll right the way down the article, dont know if this will help....meanwhile I struggle on with inserting a picture

    from the link:
    Note:
    Microsoft appears to have retained the default use of the 'normal' paragraph style to format tables; however, in Word 2007, the normal paragraph style has added spacing. This will result in extra spacing between the lines of text in tables. Word uses tables to create labels; however when those labels are created using the label tool the process is supposed to remove that extra spacing. In practice I find that it is not 100% reliable, but that is what is supposed to happen.

    The default style set also includes a standard 'No spacing' style which is what long standing Word users would have expected to have been the Normal style. Why Microsoft swapped these styles around I cannot say, but .....

    You can edit the Normal paragraph style to remove that spacing, just as you can edit any other style, and this will fix the issue for labels you create from the label tool (I would also rename the No Spacing style to Normal Spaced and add to it the spacing you have removed from the normal style); however ......

    Even more complicating is the fact that when mail merging labels, although the Normal style is used, extra padding is inserted as direct formatting, by the merge process, before each paragraph. This conspires to screw up the spacing of the paragraphs on your merged labels (see the right hand illustration immediately below this note).

    You must take this into consideration when adding merge fields and apply whatever formatting you need to give the presentation you require. One method would be to apply a non-spaced style to the first label before updating the labels. If you have modified the Normal style as mentioned above, you can simply re-apply that Normal style, which has the effect of removing the padding.

    The bottom line here is that if your labels have unwanted space, correction is a question of applying the correct formatting.[/quote]


    Thank you for your help. I tried changing the style to no spacing but it didn't work. However, since I haven't used styles, I probably didn't do it correctly. Here's what I did: I started my merge, chose directory and selected new document. Then I went to the styles ribbon and under the Change Styles button there is a two sided arrow to "show styles window" From that window I selected "no spacing." I didn't change any options under "no spacing" because I don't know if I need to. The option button is selected for "only in this document." Then I completed the merge with my fields. I still get the space so I must be doing something wrong.

    Please note: I don't want to get rid of any extra lines. It's the space that it inserts as the first character of a new line.
    I couldn't show it in my original post but if you look at it again, the last line where the person doesn't have an "Hon." in front of his name, inserts a space where a title would go if he had one in that field. It doesn't show in my example because I couldn't get this system to allow me to type a space - it deletes it when it posts.

    Hope you can help! Thanks.

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    [quote name='laineybirdy' post='793623' date='16-Sep-2009 15:24']I tried using the above code and this is what I'm getting:[/quote]
    I'm sorry, I used {NAME} where I should have used «NAME». I don't do merges very often. Maybe two or three times per decade.

    == Edit ==

    It may be beneficial to copy and paste the relevant part from your main merge document into a clean document and upload that here (attach it to a new reply) for review.

  9. #9
    Lounger
    Join Date
    Mar 2006
    Location
    Emerald Hills, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='jscher2000' post='793632' date='16-Sep-2009 23:55']I'm sorry, I used {NAME} where I should have used «NAME». I don't do merges very often. Maybe two or three times per decade.

    == Edit ==

    It may be beneficial to copy and paste the relevant part from your main merge document into a clean document and upload that here (attach it to a new reply) for review.[/quote]


    Thanks! I am attaching a part of the Table (Table.docx) that I am using to merge it into a new document as well as a portion of the merged document (merged.docx). I'm not really merging the data with anything. I'm just using the merge feature so that I can have a document that looks like the one I have attached. After I complete the merge, I have to go in and fix all the formatting - it doesn't come out this way. I added the bold, italics and line spaces between sections, and columns. I don't think there is any other way of getting the information from the table into this format without using merge.
    Attached Files Attached Files

  10. #10
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    [quote name='laineybirdy' post='793635' date='16-Sep-2009 16:29']Thanks! I am attaching a part of the Table (Table.docx) that I am using to merge it into a new document as well as a portion of the merged document (merged.docx).[/quote]
    Actually, the critical part is the other document, the one with the merge fields, before you merge it.

  11. #11
    Lounger
    Join Date
    Mar 2006
    Location
    Emerald Hills, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='jscher2000' post='793647' date='17-Sep-2009 01:40']Actually, the critical part is the other document, the one with the merge fields, before you merge it.[/quote]

    ok, here it is (merge codes.docx)

    Elaine
    Attached Files Attached Files

  12. #12
    Lounger
    Join Date
    Mar 2006
    Location
    Emerald Hills, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='jscher2000' post='793647' date='17-Sep-2009 01:40']Actually, the critical part is the other document, the one with the merge fields, before you merge it.[/quote]

    Also, FYI, here are the steps I take for the merge:

    Start with new blank document
    On the mailings tab, select Start Mail Merge, Step by Step
    Choose document type = directory
    Click next: starting document
    Use current document
    Click next: select recipients
    Select use an existing list >Browse> select file (table) > open
    Select all records (ok)
    Next
    Choose: More items
    Select the fields per document “merge codes.docx”
    Preview
    Complete the merge to document

    It comes out without the formatting, but I add that.

    Thanks,
    Elaine

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You have to set up your table differently - the category has to be repeated for each row, and the table needs to have column headings.
    To merge, you need a Directory type merge, as explained in macropod's Word 97-2007 Mailmerge Tutorial: Create Sorted Listings (v1.52).

    I have attached a zip file with the modified merge document and table. Remember that you must set the merge type to Directory for it to work correctly. And you must merge to a new document to see the result.
    Attached Files Attached Files

  14. #14
    Lounger
    Join Date
    Mar 2006
    Location
    Emerald Hills, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='793716' date='17-Sep-2009 13:51']You have to set up your table differently - the category has to be repeated for each row, and the table needs to have column headings.
    To merge, you need a Directory type merge, as explained in macropod's Word 97-2007 Mailmerge Tutorial: Create Sorted Listings (v1.52).

    I have attached a zip file with the modified merge document and table. Remember that you must set the merge type to Directory for it to work correctly. And you must merge to a new document to see the result.[/quote]

    Hi Hanz, thank you for your help. I opened the attachments but the Merge_Codes document didn't have any codes in it. It just said "coastside water district." I'm anxious to see how it comes out because I don't want the category to repeat in my final document. I have been using the Directory type merge and everything merges just fine. However, I get that extra space that I can't get rid of. It doesn't line up to the left margin.

    Could you resend the merge_codes document with the codes you used so I can try merging your documents? Thanks.

    Elaine

  15. #15
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The merge document does contain fields, but you have to view field codes to see them - press Alt+F9 to toggle field codes on and off.

    I have attached the result of the mail merge as an example.
    Attached Files Attached Files

Page 1 of 2 12 LastLast

Posting Permissions

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