A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formatting Mergefiled Problems



 
 
Thread Tools Display Modes
  #1  
Old December 18th, 2008, 10:59 AM posted to microsoft.public.word.mailmerge.fields
malycom
external usenet poster
 
Posts: 47
Default Formatting Mergefiled Problems

Hi

I have looked up and found lots of similar problems with this but I haven't
found a specific answer.

By the way, this is the first time this problem has happened to me and I
have done dozens of merges so I don't know what's happened.

Firstly, my merged data from Excel is inserting a 0 where a filed is blank.

Example
Mr Name-1 Name-2
43 Some Street
City
0
0
0 postcode

Should look like

Mr Name-1 Name-2
43 Some Street
City
Postcode

I have tried things such as {IF{MERGEFIELD 'Excel data'} 0 "{MERGEFIELD
'Excel data'}"} but this merely took out the zero leaving blank lines kind of
like this

Mr Name-1 Name-2
43 Some Street
City


postcode

I then found this function {MERGEFIELD ExcelData \# 0;;} which removed the
blank lines but this has thrown up another error.
Anywhere there is more than one word in a mergefield, only the first word is
displayed and anything including and after the first space is missing.
Again, kind of like this.

Oh, and the Mr, Name-1 & Name-2 are 3 seperate Mergefields so they are ok.

Mr Name-1 Name-2
43
City
NW1

So, the 'Some Street' of '43 Some Street' is missing from address_1 and the
second part of the post code is missing after the space.

I hope I haven't made this to confusing.

Any healp is greatly appreciated.

Oh, Merry Christmas everyone.



  #2  
Old December 18th, 2008, 11:37 AM posted to microsoft.public.word.mailmerge.fields
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Formatting Mergefield Problems

You are only adopting half a solution. You should conditionally insert the
field AND the line break eg
{Mergefield Field1}{IF {Mergefield Field2} "0" "
{Mergefield Field2}{IF {Mergefield Field3} "0" "
{Mergefield Field3}etc

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




malycom wrote:
Hi

I have looked up and found lots of similar problems with this but I
haven't found a specific answer.

By the way, this is the first time this problem has happened to me
and I have done dozens of merges so I don't know what's happened.

Firstly, my merged data from Excel is inserting a 0 where a filed is
blank.

Example
Mr Name-1 Name-2
43 Some Street
City
0
0
0 postcode

Should look like

Mr Name-1 Name-2
43 Some Street
City
Postcode

I have tried things such as {IF{MERGEFIELD 'Excel data'} 0
"{MERGEFIELD 'Excel data'}"} but this merely took out the zero
leaving blank lines kind of like this

Mr Name-1 Name-2
43 Some Street
City


postcode

I then found this function {MERGEFIELD ExcelData \# 0;;} which
removed the blank lines but this has thrown up another error.
Anywhere there is more than one word in a mergefield, only the first
word is displayed and anything including and after the first space is
missing. Again, kind of like this.

Oh, and the Mr, Name-1 & Name-2 are 3 seperate Mergefields so they
are ok.

Mr Name-1 Name-2
43
City
NW1

So, the 'Some Street' of '43 Some Street' is missing from address_1
and the second part of the post code is missing after the space.

I hope I haven't made this to confusing.

Any healp is greatly appreciated.

Oh, Merry Christmas everyone.



  #3  
Old December 18th, 2008, 12:20 PM posted to microsoft.public.word.mailmerge.fields
malycom
external usenet poster
 
Posts: 47
Default Formatting Mergefield Problems

Hi Graham

Thanks for the help but I am not sure I am getting it.

Showing what I have entered which I thought is what you were suggesting, but
the 0's are now showing again.

I'd really appreciate it if you could help with this.

Thanks in advance

Malcolm

{Mergefield "EN_PRETITLE"} {Mergefield "EN_FIRST"} {Mergefield "EN_LAST"}
{Mergefield "ADD_1"}{IF {Mergefield "ADD_2"} "0" "}
{Mergefield "ADD_2"}{IF {Mergefield "ADD_3"} "0" "}
{Mergefield "ADD_3"}{IF {Mergefield "ADD_4"} "0" "}
{Mergefield "ADD_4"}{IF {Mergefield "ADD_5"} "0" "}
{Mergefield "ADD_5"}{IF {Mergefield "ADD_6"} "0" "}
{Mergefield "ADD_6"}{IF {Mergefield "EN_COUNTRY"} "0" "}
{Mergefiled "EN_COUNTRY"} {MERGEFIELD "EN_POSTCODE"}

THis is how the first results are coming out.......


0 0 0
2 Cross Park Road
Batley
West Yorkshire
0
0
0
UK WF17 5NY

And

Mr ***** ***** (Name came out correctly)
Selham House
Nr Petworth
West Sussex
0
0
0
UK GU28 0PS



"Graham Mayor" wrote:

You are only adopting half a solution. You should conditionally insert the
field AND the line break eg
{Mergefield Field1}{IF {Mergefield Field2} "0" "
{Mergefield Field2}{IF {Mergefield Field3} "0" "
{Mergefield Field3}etc

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




malycom wrote:
Hi

I have looked up and found lots of similar problems with this but I
haven't found a specific answer.

By the way, this is the first time this problem has happened to me
and I have done dozens of merges so I don't know what's happened.

Firstly, my merged data from Excel is inserting a 0 where a filed is
blank.

Example
Mr Name-1 Name-2
43 Some Street
City
0
0
0 postcode

Should look like

Mr Name-1 Name-2
43 Some Street
City
Postcode

I have tried things such as {IF{MERGEFIELD 'Excel data'} 0
"{MERGEFIELD 'Excel data'}"} but this merely took out the zero
leaving blank lines kind of like this

Mr Name-1 Name-2
43 Some Street
City


postcode

I then found this function {MERGEFIELD ExcelData \# 0;;} which
removed the blank lines but this has thrown up another error.
Anywhere there is more than one word in a mergefield, only the first
word is displayed and anything including and after the first space is
missing. Again, kind of like this.

Oh, and the Mr, Name-1 & Name-2 are 3 seperate Mergefields so they
are ok.

Mr Name-1 Name-2
43
City
NW1

So, the 'Some Street' of '43 Some Street' is missing from address_1
and the second part of the post code is missing after the space.

I hope I haven't made this to confusing.

Any healp is greatly appreciated.

Oh, Merry Christmas everyone.




  #4  
Old December 18th, 2008, 01:35 PM posted to microsoft.public.word.mailmerge.fields
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Formatting Mergefield Problems

Check the positions of your field brackets and you may not need the quotes
around 0 so

{Mergefield "EN_PRETITLE"} {Mergefield "EN_FIRST"} {Mergefield "EN_LAST"}¶
{Mergefield "ADD_1"}{IF {Mergefield "ADD_2"} "0" "¶
{Mergefield "ADD_2"}"}{IF {Mergefield "ADD_3"} "0" "¶
{Mergefield "ADD_3"}"}{IF {Mergefield "ADD_4"} "0" "¶
{Mergefield "ADD_4"}"}{IF {Mergefield "ADD_5"} "0" "¶
{Mergefield "ADD_5"}"}{IF {Mergefield "ADD_6"} "0" "¶
{Mergefield "ADD_6"}"}{IF {Mergefield "EN_COUNTRY"} "0" "¶
{Mergefield "EN_COUNTRY"} {MERGEFIELD "EN_POSTCODE"}"¶
{IF{MERGEFIELD "EN_POSTCODE "} "0" "{MERGEFIELD "EN_POSTCODE "}"}

Press enter only where you see ¶ and note the changes to the last two lines.

or without the quotes

{Mergefield "EN_PRETITLE"} {Mergefield "EN_FIRST"} {Mergefield "EN_LAST"}
{Mergefield "ADD_1"}{IF {Mergefield "ADD_2"} 0 "
{Mergefield "ADD_2"}"}{IF {Mergefield "ADD_3"} 0 "
{Mergefield "ADD_3"}"}{IF {Mergefield "ADD_4"} 0 "
{Mergefield "ADD_4"}"}{IF {Mergefield "ADD_5"} 0 "
{Mergefield "ADD_5"}"}{IF {Mergefield "ADD_6"} 0 "
{Mergefield "ADD_6"}"}{IF {Mergefield "EN_COUNTRY"} 0 "
{Mergefield "EN_COUNTRY"} {MERGEFIELD "EN_POSTCODE"}"
{IF{MERGEFIELD "EN_POSTCODE "} 0 "{MERGEFIELD "EN_POSTCODE "}"}

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


malycom wrote:
Hi Graham

Thanks for the help but I am not sure I am getting it.

Showing what I have entered which I thought is what you were
suggesting, but the 0's are now showing again.

I'd really appreciate it if you could help with this.

Thanks in advance

Malcolm

{Mergefield "EN_PRETITLE"} {Mergefield "EN_FIRST"} {Mergefield
"EN_LAST"} {Mergefield "ADD_1"}{IF {Mergefield "ADD_2"} "0" "}
{Mergefield "ADD_2"}{IF {Mergefield "ADD_3"} "0" "}
{Mergefield "ADD_3"}{IF {Mergefield "ADD_4"} "0" "}
{Mergefield "ADD_4"}{IF {Mergefield "ADD_5"} "0" "}
{Mergefield "ADD_5"}{IF {Mergefield "ADD_6"} "0" "}
{Mergefield "ADD_6"}{IF {Mergefield "EN_COUNTRY"} "0" "}
{Mergefiled "EN_COUNTRY"} {MERGEFIELD "EN_POSTCODE"}

THis is how the first results are coming out.......


0 0 0
2 Cross Park Road
Batley
West Yorkshire
0
0
0
UK WF17 5NY

And

Mr ***** ***** (Name came out correctly)
Selham House
Nr Petworth
West Sussex
0
0
0
UK GU28 0PS



"Graham Mayor" wrote:

You are only adopting half a solution. You should conditionally
insert the field AND the line break eg
{Mergefield Field1}{IF {Mergefield Field2} "0" "
{Mergefield Field2}{IF {Mergefield Field3} "0" "
{Mergefield Field3}etc

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




malycom wrote:
Hi

I have looked up and found lots of similar problems with this but I
haven't found a specific answer.

By the way, this is the first time this problem has happened to me
and I have done dozens of merges so I don't know what's happened.

Firstly, my merged data from Excel is inserting a 0 where a filed is
blank.

Example
Mr Name-1 Name-2
43 Some Street
City
0
0
0 postcode

Should look like

Mr Name-1 Name-2
43 Some Street
City
Postcode

I have tried things such as {IF{MERGEFIELD 'Excel data'} 0
"{MERGEFIELD 'Excel data'}"} but this merely took out the zero
leaving blank lines kind of like this

Mr Name-1 Name-2
43 Some Street
City


postcode

I then found this function {MERGEFIELD ExcelData \# 0;;} which
removed the blank lines but this has thrown up another error.
Anywhere there is more than one word in a mergefield, only the first
word is displayed and anything including and after the first space
is missing. Again, kind of like this.

Oh, and the Mr, Name-1 & Name-2 are 3 seperate Mergefields so they
are ok.

Mr Name-1 Name-2
43
City
NW1

So, the 'Some Street' of '43 Some Street' is missing from address_1
and the second part of the post code is missing after the space.

I hope I haven't made this to confusing.

Any healp is greatly appreciated.

Oh, Merry Christmas everyone.



  #5  
Old December 22nd, 2008, 08:51 AM posted to microsoft.public.word.mailmerge.fields
malycom
external usenet poster
 
Posts: 47
Default Formatting Mergefield Problems

Hi Graham

Many thanks for your help - It's not 100% but it's possible I can use what
is there and do some manual editing to the individual letters after.

I really appreciate your help.

Regards

"Graham Mayor" wrote:

Check the positions of your field brackets and you may not need the quotes
around 0 so

{Mergefield "EN_PRETITLE"} {Mergefield "EN_FIRST"} {Mergefield "EN_LAST"}¶
{Mergefield "ADD_1"}{IF {Mergefield "ADD_2"} "0" "¶
{Mergefield "ADD_2"}"}{IF {Mergefield "ADD_3"} "0" "¶
{Mergefield "ADD_3"}"}{IF {Mergefield "ADD_4"} "0" "¶
{Mergefield "ADD_4"}"}{IF {Mergefield "ADD_5"} "0" "¶
{Mergefield "ADD_5"}"}{IF {Mergefield "ADD_6"} "0" "¶
{Mergefield "ADD_6"}"}{IF {Mergefield "EN_COUNTRY"} "0" "¶
{Mergefield "EN_COUNTRY"} {MERGEFIELD "EN_POSTCODE"}"¶
{IF{MERGEFIELD "EN_POSTCODE "} "0" "{MERGEFIELD "EN_POSTCODE "}"}

Press enter only where you see ¶ and note the changes to the last two lines.

or without the quotes

{Mergefield "EN_PRETITLE"} {Mergefield "EN_FIRST"} {Mergefield "EN_LAST"}
{Mergefield "ADD_1"}{IF {Mergefield "ADD_2"} 0 "
{Mergefield "ADD_2"}"}{IF {Mergefield "ADD_3"} 0 "
{Mergefield "ADD_3"}"}{IF {Mergefield "ADD_4"} 0 "
{Mergefield "ADD_4"}"}{IF {Mergefield "ADD_5"} 0 "
{Mergefield "ADD_5"}"}{IF {Mergefield "ADD_6"} 0 "
{Mergefield "ADD_6"}"}{IF {Mergefield "EN_COUNTRY"} 0 "
{Mergefield "EN_COUNTRY"} {MERGEFIELD "EN_POSTCODE"}"
{IF{MERGEFIELD "EN_POSTCODE "} 0 "{MERGEFIELD "EN_POSTCODE "}"}

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


malycom wrote:
Hi Graham

Thanks for the help but I am not sure I am getting it.

Showing what I have entered which I thought is what you were
suggesting, but the 0's are now showing again.

I'd really appreciate it if you could help with this.

Thanks in advance

Malcolm

{Mergefield "EN_PRETITLE"} {Mergefield "EN_FIRST"} {Mergefield
"EN_LAST"} {Mergefield "ADD_1"}{IF {Mergefield "ADD_2"} "0" "}
{Mergefield "ADD_2"}{IF {Mergefield "ADD_3"} "0" "}
{Mergefield "ADD_3"}{IF {Mergefield "ADD_4"} "0" "}
{Mergefield "ADD_4"}{IF {Mergefield "ADD_5"} "0" "}
{Mergefield "ADD_5"}{IF {Mergefield "ADD_6"} "0" "}
{Mergefield "ADD_6"}{IF {Mergefield "EN_COUNTRY"} "0" "}
{Mergefiled "EN_COUNTRY"} {MERGEFIELD "EN_POSTCODE"}

THis is how the first results are coming out.......


0 0 0
2 Cross Park Road
Batley
West Yorkshire
0
0
0
UK WF17 5NY

And

Mr ***** ***** (Name came out correctly)
Selham House
Nr Petworth
West Sussex
0
0
0
UK GU28 0PS



"Graham Mayor" wrote:

You are only adopting half a solution. You should conditionally
insert the field AND the line break eg
{Mergefield Field1}{IF {Mergefield Field2} "0" "
{Mergefield Field2}{IF {Mergefield Field3} "0" "
{Mergefield Field3}etc

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




malycom wrote:
Hi

I have looked up and found lots of similar problems with this but I
haven't found a specific answer.

By the way, this is the first time this problem has happened to me
and I have done dozens of merges so I don't know what's happened.

Firstly, my merged data from Excel is inserting a 0 where a filed is
blank.

Example
Mr Name-1 Name-2
43 Some Street
City
0
0
0 postcode

Should look like

Mr Name-1 Name-2
43 Some Street
City
Postcode

I have tried things such as {IF{MERGEFIELD 'Excel data'} 0
"{MERGEFIELD 'Excel data'}"} but this merely took out the zero
leaving blank lines kind of like this

Mr Name-1 Name-2
43 Some Street
City


postcode

I then found this function {MERGEFIELD ExcelData \# 0;;} which
removed the blank lines but this has thrown up another error.
Anywhere there is more than one word in a mergefield, only the first
word is displayed and anything including and after the first space
is missing. Again, kind of like this.

Oh, and the Mr, Name-1 & Name-2 are 3 seperate Mergefields so they
are ok.

Mr Name-1 Name-2
43
City
NW1

So, the 'Some Street' of '43 Some Street' is missing from address_1
and the second part of the post code is missing after the space.

I hope I haven't made this to confusing.

Any healp is greatly appreciated.

Oh, Merry Christmas everyone.




 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.