Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
Hi,
I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
Hi Tapiwa Jongwe,
The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- .. duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; .. select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; .. fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using .. delete the existing paragraph mark or line-feed that's outside the mergefield; .. position the cursor anywhere in this field and press F9 to update it; .. run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
With over 200 fields in a Word document as the data source, I imagine that
it must be in some delimited format as that far exceeds the maximum number of columns that you can have in a table. How many documents at a time are you creating from this data source and how is the data arranged in the main document? It might be easier to execute the merge to a new document and then run a macro over that documnet deleting something that is empty. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... Thanks I will try this. But I have over 200 merge fields, all starting with the prefix "MF". At any one point not more than 10 fields will have data, the rest will be blank. could there be a way to loop through all of them and delete blank lines as it would be laborious and error prone to change the 200 fields one by one? "macropod" a écrit dans le message de news: ... Hi Tapiwa Jongwe, The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- . duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; . select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; . fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using . delete the existing paragraph mark or line-feed that's outside the mergefield; . position the cursor anywhere in this field and press F9 to update it; . run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
Hello there,
I found an easier way. Adding a paragraph markat the end of each line will do the trick. However when I edit my Word template to include the paragraph marks and saving it, it does not keep them. How do I go about it and, aslo, is there a way of automatically insterting the paragrapgh marks as I have about a 100 lines if merge fields and would not like to edit them one by one. "macropod" a écrit dans le message de news: ... Hi Tapiwa Jongwe, The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- . duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; . select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; . fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using . delete the existing paragraph mark or line-feed that's outside the mergefield; . position the cursor anywhere in this field and press F9 to update it; . run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
Your solution appears to be unrelated to the issue as you originally
described it. It would probably be possible to use a macro to insert the carriage returns, but you would have to give us more information on what you are starting with to be able to provide some suggest code. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... Hello there, I found an easier way. Adding a paragraph markat the end of each line will do the trick. However when I edit my Word template to include the paragraph marks and saving it, it does not keep them. How do I go about it and, aslo, is there a way of automatically insterting the paragrapgh marks as I have about a 100 lines if merge fields and would not like to edit them one by one. "macropod" a écrit dans le message de news: ... Hi Tapiwa Jongwe, The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- . duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; . select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; . fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using . delete the existing paragraph mark or line-feed that's outside the mergefield; . position the cursor anywhere in this field and press F9 to update it; . run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#7
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
I have a word template stmt.dot containing salary informaion in two columns
in form of merge fields. The first column has labels (label1, lbel2, label3,...labeln) and the second one has corresponding amounts (amount1, amount2, amount3,.....amountn) I have just over 100 lines, each with a corresponding label and amount. However for each stmt.dot printed not all the merge fields are used. On average I use about 10 lines (10 labels fields and 10 amount fields), not necessarily consecutive, in the template and the rest appear as blank lines which I want to supress. I have realines that ending each line by a paragraph mark will suppress the baln merge files when I prin my template. I have manually added the paragraph marks after a few lines and they seem to work. Now, when I add the rest of the marks, the stsmt.dot does not retain them and therefore I end up with a merged document of about two pages but with only 10 lines filed in and spread over the two pages. I want the 10 lines to be only on one page and the rest of the empty fields to be supressed. I do not mind inserting the paragraph marks manually but the template does not keep them. That's why I thought there should be a way to do it automatically and not loose the marks. Thanks in advance for your help "Doug Robbins - Word MVP" a écrit dans le message de news: ... Your solution appears to be unrelated to the issue as you originally described it. It would probably be possible to use a macro to insert the carriage returns, but you would have to give us more information on what you are starting with to be able to provide some suggest code. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... Hello there, I found an easier way. Adding a paragraph markat the end of each line will do the trick. However when I edit my Word template to include the paragraph marks and saving it, it does not keep them. How do I go about it and, aslo, is there a way of automatically insterting the paragrapgh marks as I have about a 100 lines if merge fields and would not like to edit them one by one. "macropod" a écrit dans le message de news: ... Hi Tapiwa Jongwe, The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- . duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; . select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; . fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using . delete the existing paragraph mark or line-feed that's outside the mergefield; . position the cursor anywhere in this field and press F9 to update it; . run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#8
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
I am sorry, but I really do not understand how the use of a hard carriage
return would be achieving what you want. How many fields are their in your data source? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... I have a word template stmt.dot containing salary informaion in two columns in form of merge fields. The first column has labels (label1, lbel2, label3,...labeln) and the second one has corresponding amounts (amount1, amount2, amount3,.....amountn) I have just over 100 lines, each with a corresponding label and amount. However for each stmt.dot printed not all the merge fields are used. On average I use about 10 lines (10 labels fields and 10 amount fields), not necessarily consecutive, in the template and the rest appear as blank lines which I want to supress. I have realines that ending each line by a paragraph mark will suppress the baln merge files when I prin my template. I have manually added the paragraph marks after a few lines and they seem to work. Now, when I add the rest of the marks, the stsmt.dot does not retain them and therefore I end up with a merged document of about two pages but with only 10 lines filed in and spread over the two pages. I want the 10 lines to be only on one page and the rest of the empty fields to be supressed. I do not mind inserting the paragraph marks manually but the template does not keep them. That's why I thought there should be a way to do it automatically and not loose the marks. Thanks in advance for your help "Doug Robbins - Word MVP" a écrit dans le message de news: ... Your solution appears to be unrelated to the issue as you originally described it. It would probably be possible to use a macro to insert the carriage returns, but you would have to give us more information on what you are starting with to be able to provide some suggest code. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... Hello there, I found an easier way. Adding a paragraph markat the end of each line will do the trick. However when I edit my Word template to include the paragraph marks and saving it, it does not keep them. How do I go about it and, aslo, is there a way of automatically insterting the paragrapgh marks as I have about a 100 lines if merge fields and would not like to edit them one by one. "macropod" a écrit dans le message de news: ... Hi Tapiwa Jongwe, The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- . duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; . select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; . fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using . delete the existing paragraph mark or line-feed that's outside the mergefield; . position the cursor anywhere in this field and press F9 to update it; . run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#9
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
I have 200 fields in two columns of 100 fields. I would like to do what is
explained in Article ID: 264722 - Last Review: December 6, 2000 - Revision: 1.0 entitled "WD2000: How to Suppress Blank Lines During a Mail Merge" Here's some text from the article which pertains to Word 2000: "Frequently, in mail merges that involve addresses, there is a second line for the street address. This second line is normally used for a suite or apartment number. In order to close the "gap" in the address when no data exists for that merge field, make sure you do not place any spaces, punctuation, or anything else except merge fields on that second line. If there is anything else on that line, that line appears in all merges. NOTE: Each line must end with a paragraph mark (¶) in order for Word to suppress the line, if the result of the MERGEFIELDS is blank. If the line ends with a New Line character, Word is unable to suppress a blank line. The mail merge feature evaluates each line as the merge is performed. If there is any text on the line, that line appears in the merge result. If there is no text on the line, but there is a merge field, the mail merge feature checks to see whether there is any data for the merge field. If there is no data for the merge field, that line is not created in the merge result." "Doug Robbins - Word MVP" a écrit dans le message de news: ... I am sorry, but I really do not understand how the use of a hard carriage return would be achieving what you want. How many fields are their in your data source? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... I have a word template stmt.dot containing salary informaion in two columns in form of merge fields. The first column has labels (label1, lbel2, label3,...labeln) and the second one has corresponding amounts (amount1, amount2, amount3,.....amountn) I have just over 100 lines, each with a corresponding label and amount. However for each stmt.dot printed not all the merge fields are used. On average I use about 10 lines (10 labels fields and 10 amount fields), not necessarily consecutive, in the template and the rest appear as blank lines which I want to supress. I have realines that ending each line by a paragraph mark will suppress the baln merge files when I prin my template. I have manually added the paragraph marks after a few lines and they seem to work. Now, when I add the rest of the marks, the stsmt.dot does not retain them and therefore I end up with a merged document of about two pages but with only 10 lines filed in and spread over the two pages. I want the 10 lines to be only on one page and the rest of the empty fields to be supressed. I do not mind inserting the paragraph marks manually but the template does not keep them. That's why I thought there should be a way to do it automatically and not loose the marks. Thanks in advance for your help "Doug Robbins - Word MVP" a écrit dans le message de news: ... Your solution appears to be unrelated to the issue as you originally described it. It would probably be possible to use a macro to insert the carriage returns, but you would have to give us more information on what you are starting with to be able to provide some suggest code. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... Hello there, I found an easier way. Adding a paragraph markat the end of each line will do the trick. However when I edit my Word template to include the paragraph marks and saving it, it does not keep them. How do I go about it and, aslo, is there a way of automatically insterting the paragrapgh marks as I have about a 100 lines if merge fields and would not like to edit them one by one. "macropod" a écrit dans le message de news: ... Hi Tapiwa Jongwe, The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- . duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; . select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; . fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using . delete the existing paragraph mark or line-feed that's outside the mergefield; . position the cursor anywhere in this field and press F9 to update it; . run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#10
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
I think what you are saying is that you have 100 rows of data in two
columns. Which means that you have a data source containing two fields with 100 records. I also understand that not all of the records contain data and that you want to produce a document that contains only the records that two contain data, though I am not sure how you want that data arranged. Is it to be displayed in two columns? In my first response to this thread, I asked "How many documents at a time are you creating from this data source?" Can you please answer this question as depending upon the answer, mail merge may not be the application that you should be using. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... I have 200 fields in two columns of 100 fields. I would like to do what is explained in Article ID: 264722 - Last Review: December 6, 2000 - Revision: 1.0 entitled "WD2000: How to Suppress Blank Lines During a Mail Merge" Here's some text from the article which pertains to Word 2000: "Frequently, in mail merges that involve addresses, there is a second line for the street address. This second line is normally used for a suite or apartment number. In order to close the "gap" in the address when no data exists for that merge field, make sure you do not place any spaces, punctuation, or anything else except merge fields on that second line. If there is anything else on that line, that line appears in all merges. NOTE: Each line must end with a paragraph mark (¶) in order for Word to suppress the line, if the result of the MERGEFIELDS is blank. If the line ends with a New Line character, Word is unable to suppress a blank line. The mail merge feature evaluates each line as the merge is performed. If there is any text on the line, that line appears in the merge result. If there is no text on the line, but there is a merge field, the mail merge feature checks to see whether there is any data for the merge field. If there is no data for the merge field, that line is not created in the merge result." "Doug Robbins - Word MVP" a écrit dans le message de news: ... I am sorry, but I really do not understand how the use of a hard carriage return would be achieving what you want. How many fields are their in your data source? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... I have a word template stmt.dot containing salary informaion in two columns in form of merge fields. The first column has labels (label1, lbel2, label3,...labeln) and the second one has corresponding amounts (amount1, amount2, amount3,.....amountn) I have just over 100 lines, each with a corresponding label and amount. However for each stmt.dot printed not all the merge fields are used. On average I use about 10 lines (10 labels fields and 10 amount fields), not necessarily consecutive, in the template and the rest appear as blank lines which I want to supress. I have realines that ending each line by a paragraph mark will suppress the baln merge files when I prin my template. I have manually added the paragraph marks after a few lines and they seem to work. Now, when I add the rest of the marks, the stsmt.dot does not retain them and therefore I end up with a merged document of about two pages but with only 10 lines filed in and spread over the two pages. I want the 10 lines to be only on one page and the rest of the empty fields to be supressed. I do not mind inserting the paragraph marks manually but the template does not keep them. That's why I thought there should be a way to do it automatically and not loose the marks. Thanks in advance for your help "Doug Robbins - Word MVP" a écrit dans le message de news: ... Your solution appears to be unrelated to the issue as you originally described it. It would probably be possible to use a macro to insert the carriage returns, but you would have to give us more information on what you are starting with to be able to provide some suggest code. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... Hello there, I found an easier way. Adding a paragraph markat the end of each line will do the trick. However when I edit my Word template to include the paragraph marks and saving it, it does not keep them. How do I go about it and, aslo, is there a way of automatically insterting the paragrapgh marks as I have about a 100 lines if merge fields and would not like to edit them one by one. "macropod" a écrit dans le message de news: ... Hi Tapiwa Jongwe, The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- . duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; . select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; . fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using . delete the existing paragraph mark or line-feed that's outside the mergefield; . position the cursor anywhere in this field and press F9 to update it; . run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#11
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
Yes, I have 100 rows of data in two colums. However my data source is
another word document with the merge data in 50 rows and 4 columns. I created the merge main document but the data sources is created by an external program running on an ERP. This program creats the data source automatically based on is calucations and then looks for the main document in order to merge the data. I want to produce a document, that contains only records with data. The data should be arranged in the the two column format of the merge fields. Most of the time I create one document at a time and occassionaly several ones, up to 100, at a time. The mail merge works fine but replaces empty fields with blank lines. I need these blank lines supressed automatically after the merge is done as described in the article I quoted in my previous email.. Thanks, "Doug Robbins - Word MVP" a écrit dans le message de news: ... I think what you are saying is that you have 100 rows of data in two columns. Which means that you have a data source containing two fields with 100 records. I also understand that not all of the records contain data and that you want to produce a document that contains only the records that two contain data, though I am not sure how you want that data arranged. Is it to be displayed in two columns? In my first response to this thread, I asked "How many documents at a time are you creating from this data source?" Can you please answer this question as depending upon the answer, mail merge may not be the application that you should be using. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... I have 200 fields in two columns of 100 fields. I would like to do what is explained in Article ID: 264722 - Last Review: December 6, 2000 - Revision: 1.0 entitled "WD2000: How to Suppress Blank Lines During a Mail Merge" Here's some text from the article which pertains to Word 2000: "Frequently, in mail merges that involve addresses, there is a second line for the street address. This second line is normally used for a suite or apartment number. In order to close the "gap" in the address when no data exists for that merge field, make sure you do not place any spaces, punctuation, or anything else except merge fields on that second line. If there is anything else on that line, that line appears in all merges. NOTE: Each line must end with a paragraph mark (¶) in order for Word to suppress the line, if the result of the MERGEFIELDS is blank. If the line ends with a New Line character, Word is unable to suppress a blank line. The mail merge feature evaluates each line as the merge is performed. If there is any text on the line, that line appears in the merge result. If there is no text on the line, but there is a merge field, the mail merge feature checks to see whether there is any data for the merge field. If there is no data for the merge field, that line is not created in the merge result." "Doug Robbins - Word MVP" a écrit dans le message de news: ... I am sorry, but I really do not understand how the use of a hard carriage return would be achieving what you want. How many fields are their in your data source? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... I have a word template stmt.dot containing salary informaion in two columns in form of merge fields. The first column has labels (label1, lbel2, label3,...labeln) and the second one has corresponding amounts (amount1, amount2, amount3,.....amountn) I have just over 100 lines, each with a corresponding label and amount. However for each stmt.dot printed not all the merge fields are used. On average I use about 10 lines (10 labels fields and 10 amount fields), not necessarily consecutive, in the template and the rest appear as blank lines which I want to supress. I have realines that ending each line by a paragraph mark will suppress the baln merge files when I prin my template. I have manually added the paragraph marks after a few lines and they seem to work. Now, when I add the rest of the marks, the stsmt.dot does not retain them and therefore I end up with a merged document of about two pages but with only 10 lines filed in and spread over the two pages. I want the 10 lines to be only on one page and the rest of the empty fields to be supressed. I do not mind inserting the paragraph marks manually but the template does not keep them. That's why I thought there should be a way to do it automatically and not loose the marks. Thanks in advance for your help "Doug Robbins - Word MVP" a écrit dans le message de news: ... Your solution appears to be unrelated to the issue as you originally described it. It would probably be possible to use a macro to insert the carriage returns, but you would have to give us more information on what you are starting with to be able to provide some suggest code. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... Hello there, I found an easier way. Adding a paragraph markat the end of each line will do the trick. However when I edit my Word template to include the paragraph marks and saving it, it does not keep them. How do I go about it and, aslo, is there a way of automatically insterting the paragrapgh marks as I have about a 100 lines if merge fields and would not like to edit them one by one. "macropod" a écrit dans le message de news: ... Hi Tapiwa Jongwe, The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- . duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; . select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; . fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using . delete the existing paragraph mark or line-feed that's outside the mergefield; . position the cursor anywhere in this field and press F9 to update it; . run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
#12
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Deleting blank lines in mail merge doc
I guess we have a language problem.
Your data source contains 50 rows in 4 columns and as I understand it, you want to produce a document with the data arranged in two columns. In your data source (the document with the 4 columns), is the information in the first row the names of the fields or is it a row of data like any of the other rows. What columns in the data source (the document with 4 columns) contain the data that you want to appear in the two column document that you want to produce? Is there always data in each of the 50 rows of the data source document (the document with 4 columns), or are there empty rows followed by more data.? It would seem to me that depending upon your answers to the above question, you can probably achieve what you want with a catalog or directory type mail merge. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... Yes, I have 100 rows of data in two colums. However my data source is another word document with the merge data in 50 rows and 4 columns. I created the merge main document but the data sources is created by an external program running on an ERP. This program creats the data source automatically based on is calucations and then looks for the main document in order to merge the data. I want to produce a document, that contains only records with data. The data should be arranged in the the two column format of the merge fields. Most of the time I create one document at a time and occassionaly several ones, up to 100, at a time. The mail merge works fine but replaces empty fields with blank lines. I need these blank lines supressed automatically after the merge is done as described in the article I quoted in my previous email.. Thanks, "Doug Robbins - Word MVP" a écrit dans le message de news: ... I think what you are saying is that you have 100 rows of data in two columns. Which means that you have a data source containing two fields with 100 records. I also understand that not all of the records contain data and that you want to produce a document that contains only the records that two contain data, though I am not sure how you want that data arranged. Is it to be displayed in two columns? In my first response to this thread, I asked "How many documents at a time are you creating from this data source?" Can you please answer this question as depending upon the answer, mail merge may not be the application that you should be using. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... I have 200 fields in two columns of 100 fields. I would like to do what is explained in Article ID: 264722 - Last Review: December 6, 2000 - Revision: 1.0 entitled "WD2000: How to Suppress Blank Lines During a Mail Merge" Here's some text from the article which pertains to Word 2000: "Frequently, in mail merges that involve addresses, there is a second line for the street address. This second line is normally used for a suite or apartment number. In order to close the "gap" in the address when no data exists for that merge field, make sure you do not place any spaces, punctuation, or anything else except merge fields on that second line. If there is anything else on that line, that line appears in all merges. NOTE: Each line must end with a paragraph mark (¶) in order for Word to suppress the line, if the result of the MERGEFIELDS is blank. If the line ends with a New Line character, Word is unable to suppress a blank line. The mail merge feature evaluates each line as the merge is performed. If there is any text on the line, that line appears in the merge result. If there is no text on the line, but there is a merge field, the mail merge feature checks to see whether there is any data for the merge field. If there is no data for the merge field, that line is not created in the merge result." "Doug Robbins - Word MVP" a écrit dans le message de news: ... I am sorry, but I really do not understand how the use of a hard carriage return would be achieving what you want. How many fields are their in your data source? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... I have a word template stmt.dot containing salary informaion in two columns in form of merge fields. The first column has labels (label1, lbel2, label3,...labeln) and the second one has corresponding amounts (amount1, amount2, amount3,.....amountn) I have just over 100 lines, each with a corresponding label and amount. However for each stmt.dot printed not all the merge fields are used. On average I use about 10 lines (10 labels fields and 10 amount fields), not necessarily consecutive, in the template and the rest appear as blank lines which I want to supress. I have realines that ending each line by a paragraph mark will suppress the baln merge files when I prin my template. I have manually added the paragraph marks after a few lines and they seem to work. Now, when I add the rest of the marks, the stsmt.dot does not retain them and therefore I end up with a merged document of about two pages but with only 10 lines filed in and spread over the two pages. I want the 10 lines to be only on one page and the rest of the empty fields to be supressed. I do not mind inserting the paragraph marks manually but the template does not keep them. That's why I thought there should be a way to do it automatically and not loose the marks. Thanks in advance for your help "Doug Robbins - Word MVP" a écrit dans le message de news: ... Your solution appears to be unrelated to the issue as you originally described it. It would probably be possible to use a macro to insert the carriage returns, but you would have to give us more information on what you are starting with to be able to provide some suggest code. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tapiwa Jongwe" wrote in message ... Hello there, I found an easier way. Adding a paragraph markat the end of each line will do the trick. However when I edit my Word template to include the paragraph marks and saving it, it does not keep them. How do I go about it and, aslo, is there a way of automatically insterting the paragrapgh marks as I have about a 100 lines if merge fields and would not like to edit them one by one. "macropod" a écrit dans le message de news: ... Hi Tapiwa Jongwe, The usual way to suppress blank lines in a mailmerge is to apply an IF test to the mergefields that might sometimes be empty. The way to do this in Word is to- . duplicate the mailmerge field to be suppressed (eg «MyData») so that you get: «MyData»«MyData»; . select both fields and Press Ctrl-F9, you'll get: { «MyData»«MyData» }; . fill in between the braces so that you end up with: {IF«myData»= "" "" "«MyData»¶ "}, where the '¶' is a paragraph mark or line-feed, depending on which you're using . delete the existing paragraph mark or line-feed that's outside the mergefield; . position the cursor anywhere in this field and press F9 to update it; . run your mailmerge. -- Cheers macropod [MVP - Microsoft Word] "Tapiwa Jongwe" wrote in message ... Hi, I have a mail merge document of about six pages whose data source is another word doc. However, not all the merge fields contain data at any given time. Sometimes I have two fields on page one with data and one files on page six with data. When I merge this info, I have five pages blank in between. How can I automatically delete these blank lines each i do the merge? Thanks in advance. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mail Merge Using Contacts from Mail - Blank Lines | Mailmerge | |||
Deleting a blank line in mail merge | Mailmerge | |||
Mail Merge SP3 - Suppressing Blank Lines | Mailmerge | |||
blank lines in mail merge 2003? | Mailmerge | |||
blank lines in XP mail merge | Mailmerge |