A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Delete Blank Lines with Word 2007 Mail Merge



 
 
Thread Tools Display Modes
  #1  
Old August 21st 08, 03:43 AM posted to microsoft.public.word.mailmerge.fields
SSJ
external usenet poster
 
Posts: 4
Default Delete Blank Lines with Word 2007 Mail Merge

I have been researching this problem and have not found a good
solution. I attempted to use the IF function which does leave the
line blank, but does not actually delete the line. I am attempting to
merge data into a word file. The data to merge contains a different
number of rows depending on the prospect. Some letters will have 2
pieces of information to mail merge others will have up to 10. After
the portion of the letter that needs data merged the standard letter
continues.

What I would like to do is have the portion of the letter following
the merged data to continue after the last line of merged data. All I
have found to do so far is have a wide area of blank space between the
last merged data and the remaining portion of the letter.

For example if I merge in one letter 2 pieces of data, but it is set
up to hold 10 lines of data I have 8 blank lines between the merge and
remaining portion of the letter. Is there anyway to have the blank
space be dynamic for each letter?

Thanks!
Ads
  #2  
Old August 21st 08, 06:10 AM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,832
Default Delete Blank Lines with Word 2007 Mail Merge

Is the variable number of pieces of data in separate fields in the one
record or do you have multiple records that you want to combine into one
document where each of those records contains data that is common for that
document?

The first certainly can be done with the use of If...then...Else field
constructions, thought setting it up can be a bit monotonous for dealing
with 2, 3, 4, 5, 6, 7, 8, 9 or 10 pieces of data.

For the second, use the method on the following website:

http://cornell.veplan.net/article.aspx?&a=3815


--
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

"SSJ" wrote in message
...
I have been researching this problem and have not found a good
solution. I attempted to use the IF function which does leave the
line blank, but does not actually delete the line. I am attempting to
merge data into a word file. The data to merge contains a different
number of rows depending on the prospect. Some letters will have 2
pieces of information to mail merge others will have up to 10. After
the portion of the letter that needs data merged the standard letter
continues.

What I would like to do is have the portion of the letter following
the merged data to continue after the last line of merged data. All I
have found to do so far is have a wide area of blank space between the
last merged data and the remaining portion of the letter.

For example if I merge in one letter 2 pieces of data, but it is set
up to hold 10 lines of data I have 8 blank lines between the merge and
remaining portion of the letter. Is there anyway to have the blank
space be dynamic for each letter?

Thanks!



  #3  
Old August 21st 08, 01:13 PM posted to microsoft.public.word.mailmerge.fields
SSJ
external usenet poster
 
Posts: 4
Default Delete Blank Lines with Word 2007 Mail Merge

On Aug 21, 1:10*am, "Doug Robbins - Word MVP"
wrote:
Is the variable number of pieces of data in separate fields in the one
record or do you have multiple records that you want to combine into one
document where each of those records contains data that is common for that
document?

The first certainly can be done with the use of If...then...Else field
constructions, thought setting it up can be a bit monotonous for dealing
with 2, 3, 4, 5, 6, 7, 8, 9 or 10 pieces of data.

For the second, use the method on the following website:

http://cornell.veplan.net/article.aspx?&a=3815

--
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

"SSJ" wrote in message

...



I have been researching this problem and have not found a good
solution. *I attempted to use the IF function which does leave the
line blank, but does not actually delete the line. *I am attempting to
merge data into a word file. *The data to merge contains a different
number of rows depending on the prospect. *Some letters will have 2
pieces of information to mail merge others will have up to 10. *After
the portion of the letter that needs data merged the standard letter
continues.


What I would like to do is have the portion of the letter following
the merged data to continue after the last line of merged data. *All I
have found to do so far is have a wide area of blank space between the
last merged data and the remaining portion of the letter.


For example if I merge in one letter 2 pieces of data, but it is set
up to hold 10 lines of data I have 8 blank lines between the merge and
remaining portion of the letter. *Is there anyway to have the blank
space be dynamic for each letter?


Thanks!- Hide quoted text -


- Show quoted text -


The data records I have are all in one row. The prospects name and
the data I want to merge about the prospect appear in the same row.
There is a possiblity of up to 10 columns of information for each
prospect. Not all prospects have 10 pieces of information. Some only
have 2 and others 8 or 10. When I attempt to set this up in word it
allows for 10 lines of information. In the case of a prospect with
only 2 lines of information there is a huge blank gap between the last
line of merged information and the remaining portion of the letter. I
simply want something that will remove the "gap" moving the remaining
letter up or down depending on the amount of lines needed for the
merged data.

I appreciate your help.
  #4  
Old August 21st 08, 11:18 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,832
Default Delete Blank Lines with Word 2007 Mail Merge

Assuming that the ten fields that may not all contain data are name Opt1,
Opt2, ... Opt10, then use the following field construciton

{ IF { MERGEFIELD Opt1 } "" { MERGEFIELD Opt1 } "" }{ IF { MERGEFIELD
Opt2 } "" "[ENTER]{ MERGEFIELD Opt2 }" "" }{IF { MERGEFIELD Opt3 } ""
"[ENTER]{ MERGEFIELD Opt3 }" "" }{IF { MERGEFIELD Opt4 } "" "[ENTER]{
MERGEFIELD Opt4 }" "" }{IF { MERGEFIELD Opt5 } "" "[ENTER]{ MERGEFIELD
Opt5 }" "" }{IF { MERGEFIELD Opt6 } "" "[ENTER]{ MERGEFIELD Opt6}"
"" }{IF { MERGEFIELD Opt7 } "" "[ENTER]{ MERGEFIELD Opt7 }" "" }{IF {
MERGEFIELD Opt8 } "" "[ENTER]{ MERGEFIELD Opt8 }" "" }{IF { MERGEFIELD
Opt9 } "" "[ENTER]{ MERGEFIELD Opt9 }" "" }{IF { MERGEFIELD Opt10 } ""
"[ENTER]{ MERGEFIELD Opt10 }" "" }

You must use Ctrl+F9 to insert each pair of field delimiters and I suggest
that in the first instance, you type [ENTER] whereever it appears above, so
that to begin with, this construction is all in one paragraph. (When you
have entered the { IF { MERGEFIELD Opt2 } "" "[ENTER]{ MERGEFIELD Opt2 }"
"" }, you can copy and paste that changing the field name each time)

When you have this all set up in one paragraph, select each [ENTER] in turn
and press the Enter Key to replace it with a carriage return.

--
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

"SSJ" wrote in message
...
On Aug 21, 1:10 am, "Doug Robbins - Word MVP"
wrote:
Is the variable number of pieces of data in separate fields in the one
record or do you have multiple records that you want to combine into one
document where each of those records contains data that is common for that
document?

The first certainly can be done with the use of If...then...Else field
constructions, thought setting it up can be a bit monotonous for dealing
with 2, 3, 4, 5, 6, 7, 8, 9 or 10 pieces of data.

For the second, use the method on the following website:

http://cornell.veplan.net/article.aspx?&a=3815

--
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

"SSJ" wrote in message

...



I have been researching this problem and have not found a good
solution. I attempted to use the IF function which does leave the
line blank, but does not actually delete the line. I am attempting to
merge data into a word file. The data to merge contains a different
number of rows depending on the prospect. Some letters will have 2
pieces of information to mail merge others will have up to 10. After
the portion of the letter that needs data merged the standard letter
continues.


What I would like to do is have the portion of the letter following
the merged data to continue after the last line of merged data. All I
have found to do so far is have a wide area of blank space between the
last merged data and the remaining portion of the letter.


For example if I merge in one letter 2 pieces of data, but it is set
up to hold 10 lines of data I have 8 blank lines between the merge and
remaining portion of the letter. Is there anyway to have the blank
space be dynamic for each letter?


Thanks!- Hide quoted text -


- Show quoted text -


The data records I have are all in one row. The prospects name and
the data I want to merge about the prospect appear in the same row.
There is a possiblity of up to 10 columns of information for each
prospect. Not all prospects have 10 pieces of information. Some only
have 2 and others 8 or 10. When I attempt to set this up in word it
allows for 10 lines of information. In the case of a prospect with
only 2 lines of information there is a huge blank gap between the last
line of merged information and the remaining portion of the letter. I
simply want something that will remove the "gap" moving the remaining
letter up or down depending on the amount of lines needed for the
merged data.

I appreciate your help.


  #5  
Old August 22nd 08, 02:50 PM posted to microsoft.public.word.mailmerge.fields
SSJ
external usenet poster
 
Posts: 4
Default Delete Blank Lines with Word 2007 Mail Merge

On Aug 21, 6:18*pm, "Doug Robbins - Word MVP"
wrote:
Assuming that the ten fields that may not all contain data are name Opt1,
Opt2, ... Opt10, then use the following field construciton

{ IF { MERGEFIELD Opt1 } "" { MERGEFIELD Opt1 } "" }{ IF { MERGEFIELD
Opt2 } "" "[ENTER]{ MERGEFIELD Opt2 }" "" }{IF { MERGEFIELD Opt3 } ""
"[ENTER]{ MERGEFIELD Opt3 }" "" }{IF { MERGEFIELD Opt4 } "" "[ENTER]{
MERGEFIELD Opt4 }" "" }{IF { MERGEFIELD Opt5 } "" "[ENTER]{ MERGEFIELD
Opt5 }" "" }{IF { MERGEFIELD Opt6 } "" "[ENTER]{ MERGEFIELD Opt6}"
"" }{IF { MERGEFIELD Opt7 } "" "[ENTER]{ MERGEFIELD Opt7 }" "" }{IF {
MERGEFIELD Opt8 } "" "[ENTER]{ MERGEFIELD Opt8 }" "" }{IF { MERGEFIELD
Opt9 } "" "[ENTER]{ MERGEFIELD Opt9 }" "" }{IF { MERGEFIELD Opt10 } ""
"[ENTER]{ MERGEFIELD Opt10 }" "" }

You must use Ctrl+F9 to insert each pair of field delimiters and I suggest
that in the first instance, you type [ENTER] whereever it appears above, so
that to begin with, this construction is all in one paragraph. *(When you
have entered the { IF { MERGEFIELD Opt2 } "" "[ENTER]{ MERGEFIELD Opt2 }"
"" }, you can copy and paste that changing the field name each time)

When you have this all set up in one paragraph, select each [ENTER] in turn
and press the Enter Key to replace it with a carriage return.

--
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

"SSJ" wrote in message

...
On Aug 21, 1:10 am, "Doug Robbins - Word MVP"





wrote:
Is the variable number of pieces of data in separate fields in the one
record or do you have multiple records that you want to combine into one
document where each of those records contains data that is common for that
document?


The first certainly can be done with the use of If...then...Else field
constructions, thought setting it up can be a bit monotonous for dealing
with 2, 3, 4, 5, 6, 7, 8, 9 or 10 pieces of data.


For the second, use the method on the following website:


http://cornell.veplan.net/article.aspx?&a=3815


--
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


"SSJ" wrote in message


....


I have been researching this problem and have not found a good
solution. I attempted to use the IF function which does leave the
line blank, but does not actually delete the line. I am attempting to
merge data into a word file. The data to merge contains a different
number of rows depending on the prospect. Some letters will have 2
pieces of information to mail merge others will have up to 10. After
the portion of the letter that needs data merged the standard letter
continues.


What I would like to do is have the portion of the letter following
the merged data to continue after the last line of merged data. All I
have found to do so far is have a wide area of blank space between the
last merged data and the remaining portion of the letter.


For example if I merge in one letter 2 pieces of data, but it is set
up to hold 10 lines of data I have 8 blank lines between the merge and
remaining portion of the letter. Is there anyway to have the blank
space be dynamic for each letter?


Thanks!- Hide quoted text -


- Show quoted text -


The data records I have are all in one row. *The prospects name and
the data I want to merge about the prospect appear in the same row.
There is a possiblity of up to 10 columns of information for each
prospect. *Not all prospects have 10 pieces of information. *Some only
have 2 and others 8 or 10. *When I attempt to set this up in word it
allows for 10 lines of information. *In the case of a prospect with
only 2 lines of information there is a huge blank gap between the last
line of merged information and the remaining portion of the letter. *I
simply want something that will remove the "gap" moving the remaining
letter up or down depending on the amount of lines needed for the
merged data.

I appreciate your help.- Hide quoted text -

- Show quoted text -


Thank you for all your help. I am having one problem. When I select
[Enter] and press the enter key it moves the line down one time (it
does not insert a carriage symbol). This still leaves all the extra
blank lines between the last merged data and remaining letter. Any
ideas?

I don't think I mentioned and maybe this has something to do with the
problem, on each line of merged data there are 4 things to merge on
one line. When I do a {Mergefield "Data1"} I then press tab and do
{Mergefield "Data2"}... etc. Then I complete the code and press
enter. Would the "tab" have anything to do with the issue?

Thanks!
  #6  
Old August 22nd 08, 04:35 PM posted to microsoft.public.word.mailmerge.fields
SSJ
external usenet poster
 
Posts: 4
Default Delete Blank Lines with Word 2007 Mail Merge

On Aug 22, 9:50*am, SSJ wrote:
On Aug 21, 6:18*pm, "Doug Robbins - Word MVP"





wrote:
Assuming that the ten fields that may not all contain data are name Opt1,
Opt2, ... Opt10, then use the following field construciton


{ IF { MERGEFIELD Opt1 } "" { MERGEFIELD Opt1 } "" }{ IF { MERGEFIELD
Opt2 } "" "[ENTER]{ MERGEFIELD Opt2 }" "" }{IF { MERGEFIELD Opt3 } ""
"[ENTER]{ MERGEFIELD Opt3 }" "" }{IF { MERGEFIELD Opt4 } "" "[ENTER]{
MERGEFIELD Opt4 }" "" }{IF { MERGEFIELD Opt5 } "" "[ENTER]{ MERGEFIELD
Opt5 }" "" }{IF { MERGEFIELD Opt6 } "" "[ENTER]{ MERGEFIELD Opt6}"
"" }{IF { MERGEFIELD Opt7 } "" "[ENTER]{ MERGEFIELD Opt7 }" "" }{IF {
MERGEFIELD Opt8 } "" "[ENTER]{ MERGEFIELD Opt8 }" "" }{IF { MERGEFIELD
Opt9 } "" "[ENTER]{ MERGEFIELD Opt9 }" "" }{IF { MERGEFIELD Opt10 } ""
"[ENTER]{ MERGEFIELD Opt10 }" "" }


You must use Ctrl+F9 to insert each pair of field delimiters and I suggest
that in the first instance, you type [ENTER] whereever it appears above, so
that to begin with, this construction is all in one paragraph. *(When you
have entered the { IF { MERGEFIELD Opt2 } "" "[ENTER]{ MERGEFIELD Opt2 }"
"" }, you can copy and paste that changing the field name each time)


When you have this all set up in one paragraph, select each [ENTER] in turn
and press the Enter Key to replace it with a carriage return.


--
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


"SSJ" wrote in message


...
On Aug 21, 1:10 am, "Doug Robbins - Word MVP"


wrote:
Is the variable number of pieces of data in separate fields in the one
record or do you have multiple records that you want to combine into one
document where each of those records contains data that is common for that
document?


The first certainly can be done with the use of If...then...Else field
constructions, thought setting it up can be a bit monotonous for dealing
with 2, 3, 4, 5, 6, 7, 8, 9 or 10 pieces of data.


For the second, use the method on the following website:


http://cornell.veplan.net/article.aspx?&a=3815


--
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


"SSJ" wrote in message


....


I have been researching this problem and have not found a good
solution. I attempted to use the IF function which does leave the
line blank, but does not actually delete the line. I am attempting to
merge data into a word file. The data to merge contains a different
number of rows depending on the prospect. Some letters will have 2
pieces of information to mail merge others will have up to 10. After
the portion of the letter that needs data merged the standard letter
continues.


What I would like to do is have the portion of the letter following
the merged data to continue after the last line of merged data. All I
have found to do so far is have a wide area of blank space between the
last merged data and the remaining portion of the letter.


For example if I merge in one letter 2 pieces of data, but it is set
up to hold 10 lines of data I have 8 blank lines between the merge and
remaining portion of the letter. Is there anyway to have the blank
space be dynamic for each letter?


Thanks!- Hide quoted text -


- Show quoted text -


The data records I have are all in one row. *The prospects name and
the data I want to merge about the prospect appear in the same row.
There is a possiblity of up to 10 columns of information for each
prospect. *Not all prospects have 10 pieces of information. *Some only
have 2 and others 8 or 10. *When I attempt to set this up in word it
allows for 10 lines of information. *In the case of a prospect with
only 2 lines of information there is a huge blank gap between the last
line of merged information and the remaining portion of the letter. *I
simply want something that will remove the "gap" moving the remaining
letter up or down depending on the amount of lines needed for the
merged data.


I appreciate your help.- Hide quoted text -


- Show quoted text -


Thank you for all your help. *I am having one problem. *When I select
[Enter] and press the enter key it moves the line down one time (it
does not insert a carriage symbol). *This still leaves all the extra
blank lines between the last merged data and remaining letter. *Any
ideas?

I don't think I mentioned and maybe this has something to do with the
problem, on each line of merged data there are 4 things to merge on
one line. *When I do a {Mergefield "Data1"} I then press tab and do
{Mergefield "Data2"}... etc. *Then I complete the code and press
enter. *Would the "tab" have anything to do with the issue?

Thanks!- Hide quoted text -

- Show quoted text -


I found the issue, I was putting a space between "". Thanks so much
for all your help! It works perfectly.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove blank lines in mail merge labels in Word 2003 Islandtop Mailmerge 2 December 7th 07 06:24 PM
How do I print blank lines in a mail merge using Word 2007? Monk Mailmerge 2 September 19th 07 08:54 PM
blank lines in XP mail merge mwest Mailmerge 1 August 19th 05 06:08 PM
How do I avoid printing blank lines using mail merge in Word 2003. Printerb Mailmerge 1 April 15th 05 11:01 AM
How to I delete blank lines/labels in the mail merge function? Suzieq Mailmerge 2 December 17th 04 03:21 AM


All times are GMT +1. The time now is 10:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.