Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lester Lane[_2_] Lester Lane[_2_] is offline
external usenet poster
 
Posts: 5
Default Text appears when the fields are blank

Hi, I'm not sure if I have the right approach to this problem but here
goes:

I can have up to 5 sets of fields with each set consisting of 3 fields
per record. Some records only have say 3 sets. On the letter each
set is a separate line. For the 4th and 5th sets rather than get a
supressed row if I simply had one field on its own I end up with some
of the text buried within the merge formula. How can I change my
approach/formula to make sure rows 4 & 5 are totally supressed please?

{ MERGEFIELD "M_2Shares" /f ""}{ IF { MERGEFIELD M_2InvestmentName }
"cash" " shares in { MERGEFIELD M_2InvestmentName /f ""} valued at
£{ MERGEFIELD M_2CurrentValue }" "valued at £{ MERGEFIELD
M_2CurrentValue} }

Correct displays include:
9,764 shares in Edinburgh New Income Trust plc 1p ords (ENI) valued at
£4,064.75
Remainder as Cash valued at £200.00

Using [] to show field data:
[9,764] shares in [Edinburgh New Income Trust plc 1p ords (ENI)]
valued at £[4,064.75]
[Remainder as Cash] valued at [£200.00]

Blank lines that should be supressed show:
shares in valued at £

which is that same if I had the text part outside the IF statement
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Text appears when the fields are blank

I think that your construction should be:

"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD "M_2Shares" /f
" shares in "}{ MERGEFIELD M_2InvestmentName /f " valued at
£"}{ MERGEFIELD M_2CurrentValue }" "valued at £{ MERGEFIELD
M_2CurrentValue}" }

But, I am not sure about the negative result because in your field
construction, I do not see from where the "Remainder as Cash " comes.
--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message
...
Hi, I'm not sure if I have the right approach to this problem but here
goes:

I can have up to 5 sets of fields with each set consisting of 3 fields
per record. Some records only have say 3 sets. On the letter each
set is a separate line. For the 4th and 5th sets rather than get a
supressed row if I simply had one field on its own I end up with some
of the text buried within the merge formula. How can I change my
approach/formula to make sure rows 4 & 5 are totally supressed please?

{ MERGEFIELD "M_2Shares" /f ""}{ IF { MERGEFIELD M_2InvestmentName }
"cash" " shares in { MERGEFIELD M_2InvestmentName /f ""} valued at
£{ MERGEFIELD M_2CurrentValue }" "valued at £{ MERGEFIELD
M_2CurrentValue} }

Correct displays include:
9,764 shares in Edinburgh New Income Trust plc 1p ords (ENI) valued at
£4,064.75
Remainder as Cash valued at £200.00

Using [] to show field data:
[9,764] shares in [Edinburgh New Income Trust plc 1p ords (ENI)]
valued at £[4,064.75]
[Remainder as Cash] valued at [£200.00]

Blank lines that should be supressed show:
shares in valued at £

which is that same if I had the text part outside the IF statement


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lester Lane[_2_] Lester Lane[_2_] is offline
external usenet poster
 
Posts: 5
Default Text appears when the fields are blank

On 31 Mar, 22:29, "Doug Robbins - Word MVP"
wrote:
I think that your construction should be:

"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD "M_2Shares" /f
" shares in "}{ MERGEFIELD M_2InvestmentName */f " valued at
"}{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue}" }

But, I am not sure about the negative result because in your field
construction, I do not see from where the "Remainder as Cash " comes.
--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message

...

Hi, I'm not sure if I have the right approach to this problem but here
goes:


I can have up to 5 sets of fields with each set consisting of 3 fields
per record. *Some records only have say 3 sets. *On the letter each
set is a separate line. *For the 4th and 5th sets rather than get a
supressed row if I simply had one field on its own I end up with some
of the text buried within the merge formula. *How can I change my
approach/formula to make sure rows 4 & 5 are totally supressed please?


{ MERGEFIELD "M_2Shares" /f ""}{ IF { MERGEFIELD M_2InvestmentName }
"cash" " shares in { MERGEFIELD M_2InvestmentName */f ""} valued at
{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue} }


Correct displays include:
9,764 shares in Edinburgh New Income Trust plc 1p ords (ENI) valued at
4,064.75
Remainder as Cash valued at 200.00


Using [] to show field data:
[9,764] shares in [Edinburgh New Income Trust plc 1p ords (ENI)]
valued at [4,064.75]
[Remainder as Cash] valued at [ 200.00]


Blank lines that should be supressed show:
shares in *valued at


which is that same if I had the text part outside the IF statement


Brilliant, thanks. I now understand the /f part and how to edit it!
I ended up with:
"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
M_2Shares /f
" shares in "}{ MERGEFIELD M_2InvestmentName /f " valued at
£"}{ MERGEFIELD M_2CurrentValue }" "Cash valued at £{ MERGEFIELD
M_2CurrentValue}" }

"Remainder as Cash" was in the Shares field but now I can remove this
and leave the field blank, which is neater. However I still don't
have this formulae able to supress itself if there is nothing in any
of the 3 fields. Any ideas on that please?
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Text appears when the fields are blank

I am assuming that what you want to suppress is a blank line. To do that,
start the field construction at the end of the previous line and insert a
carriage return (or Shift +Enter) where the ¶ appears in the following
construction

{ IF { MERGEFIELD M_2InvestmentName } "cash" "¶
{ MERGEFIELD M_2Shares /f " shares in "}{ MERGEFIELD M_2InvestmentName /f "
valued at
£"}{ MERGEFIELD M_2CurrentValue }" { IF { MERGEFIELD M_2CurrentValue } 0

Cash valued at £{ MERGEFIELD M_2CurrentValue}" "" } }


--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message
...
On 31 Mar, 22:29, "Doug Robbins - Word MVP"
wrote:
I think that your construction should be:

"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD "M_2Shares"
/f
" shares in "}{ MERGEFIELD M_2InvestmentName /f " valued at
"}{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue}" }

But, I am not sure about the negative result because in your field
construction, I do not see from where the "Remainder as Cash " comes.
--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message

...

Hi, I'm not sure if I have the right approach to this problem but here
goes:


I can have up to 5 sets of fields with each set consisting of 3 fields
per record. Some records only have say 3 sets. On the letter each
set is a separate line. For the 4th and 5th sets rather than get a
supressed row if I simply had one field on its own I end up with some
of the text buried within the merge formula. How can I change my
approach/formula to make sure rows 4 & 5 are totally supressed please?


{ MERGEFIELD "M_2Shares" /f ""}{ IF { MERGEFIELD M_2InvestmentName }
"cash" " shares in { MERGEFIELD M_2InvestmentName /f ""} valued at
{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue} }


Correct displays include:
9,764 shares in Edinburgh New Income Trust plc 1p ords (ENI) valued at
4,064.75
Remainder as Cash valued at 200.00


Using [] to show field data:
[9,764] shares in [Edinburgh New Income Trust plc 1p ords (ENI)]
valued at [4,064.75]
[Remainder as Cash] valued at [ 200.00]


Blank lines that should be supressed show:
shares in valued at


which is that same if I had the text part outside the IF statement


Brilliant, thanks. I now understand the /f part and how to edit it!
I ended up with:
"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
M_2Shares /f
" shares in "}{ MERGEFIELD M_2InvestmentName /f " valued at
£"}{ MERGEFIELD M_2CurrentValue }" "Cash valued at £{ MERGEFIELD
M_2CurrentValue}" }

"Remainder as Cash" was in the Shares field but now I can remove this
and leave the field blank, which is neater. However I still don't
have this formulae able to supress itself if there is nothing in any
of the 3 fields. Any ideas on that please?


  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lester Lane[_2_] Lester Lane[_2_] is offline
external usenet poster
 
Posts: 5
Default Text appears when the fields are blank

On 1 Apr, 22:33, "Doug Robbins - Word MVP"
wrote:
I am assuming that what you want to suppress is a blank line. *To do that,
start the field construction at the end of the previous line and insert a
carriage return (or Shift +Enter) where the ¶ appears in the following
construction

{ IF { MERGEFIELD M_2InvestmentName } "cash" "¶
{ MERGEFIELD M_2Shares /f " shares in "}{ MERGEFIELD M_2InvestmentName */f "
valued at
£"}{ MERGEFIELD M_2CurrentValue }" { IF { MERGEFIELD M_2CurrentValue } 0

Cash valued at £{ MERGEFIELD M_2CurrentValue}" "" } }

--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message

...

On 31 Mar, 22:29, "Doug Robbins - Word MVP"
wrote:
I think that your construction should be:


"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD "M_2Shares"
/f
" shares in "}{ MERGEFIELD M_2InvestmentName */f " valued at
"}{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue}" }


But, I am not sure about the negative result because in your field
construction, I do not see from where the "Remainder as Cash " comes.
--
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, originally posted via msnews.microsoft.com


"Lester Lane" wrote in message


....


Hi, I'm not sure if I have the right approach to this problem but here
goes:


I can have up to 5 sets of fields with each set consisting of 3 fields
per record. *Some records only have say 3 sets. *On the letter each
set is a separate line. *For the 4th and 5th sets rather than get a
supressed row if I simply had one field on its own I end up with some
of the text buried within the merge formula. *How can I change my
approach/formula to make sure rows 4 & 5 are totally supressed please?


{ MERGEFIELD "M_2Shares" /f ""}{ IF { MERGEFIELD M_2InvestmentName }
"cash" " shares in { MERGEFIELD M_2InvestmentName */f ""} valued at
{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue} }


Correct displays include:
9,764 shares in Edinburgh New Income Trust plc 1p ords (ENI) valued at
4,064.75
Remainder as Cash valued at 200.00


Using [] to show field data:
[9,764] shares in [Edinburgh New Income Trust plc 1p ords (ENI)]
valued at [4,064.75]
[Remainder as Cash] valued at [ 200.00]


Blank lines that should be supressed show:
shares in *valued at


which is that same if I had the text part outside the IF statement


Brilliant, thanks. *I now understand the /f part and how to edit it!
I ended up with:
"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
M_2Shares /f
" shares in "}{ MERGEFIELD M_2InvestmentName */f " valued at
£"}{ MERGEFIELD M_2CurrentValue }" "Cash valued at £{ MERGEFIELD
M_2CurrentValue}" }


"Remainder as Cash" was in the Shares field but now I can remove this
and leave the field blank, which is neater. *However I still don't
have this formulae able to supress itself if there is nothing in any
of the 3 fields. *Any ideas on that please?


Not quite. The above suggestion gives me extra blank rows. I have
noticed that if on each line I simply have say the Shares field so the
first line is {MERGEFIELD M_1Shares} and the 5th line has {MERGEFIELD
M_5Shares} if the 4th and 5th Shares fields are blank then lines 4 and
5 do not appear at all. They are not blank, they simply vanish. If I
swap the simple merge fields for the complex IF statement then lines 4
and 5 are there but they are blank. Ideally I would like them to
"vanish" also. Hope that is clearer.


  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Text appears when the fields are blank

It will be easier to sort this out if you can send me the mail merge main
document and some "dummy" records that cover the range of combinations of
data that you are trying to handle.

You can send it to dkr[atsymbol]mvps[dot]org

--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message
...
On 1 Apr, 22:33, "Doug Robbins - Word MVP"
wrote:
I am assuming that what you want to suppress is a blank line. To do
that,
start the field construction at the end of the previous line and insert a
carriage return (or Shift +Enter) where the ¶ appears in the following
construction

{ IF { MERGEFIELD M_2InvestmentName } "cash" "¶
{ MERGEFIELD M_2Shares /f " shares in "}{ MERGEFIELD M_2InvestmentName
/f "
valued at
£"}{ MERGEFIELD M_2CurrentValue }" { IF { MERGEFIELD M_2CurrentValue }
0

Cash valued at £{ MERGEFIELD M_2CurrentValue}" "" } }

--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message

...

On 31 Mar, 22:29, "Doug Robbins - Word MVP"
wrote:
I think that your construction should be:


"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
"M_2Shares"
/f
" shares in "}{ MERGEFIELD M_2InvestmentName /f " valued at
"}{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue}" }


But, I am not sure about the negative result because in your field
construction, I do not see from where the "Remainder as Cash " comes.
--
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, originally posted via msnews.microsoft.com


"Lester Lane" wrote in message


...


Hi, I'm not sure if I have the right approach to this problem but
here
goes:


I can have up to 5 sets of fields with each set consisting of 3
fields
per record. Some records only have say 3 sets. On the letter each
set is a separate line. For the 4th and 5th sets rather than get a
supressed row if I simply had one field on its own I end up with
some
of the text buried within the merge formula. How can I change my
approach/formula to make sure rows 4 & 5 are totally supressed
please?


{ MERGEFIELD "M_2Shares" /f ""}{ IF { MERGEFIELD M_2InvestmentName }
"cash" " shares in { MERGEFIELD M_2InvestmentName /f ""} valued
at
{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue} }


Correct displays include:
9,764 shares in Edinburgh New Income Trust plc 1p ords (ENI) valued
at
4,064.75
Remainder as Cash valued at 200.00


Using [] to show field data:
[9,764] shares in [Edinburgh New Income Trust plc 1p ords (ENI)]
valued at [4,064.75]
[Remainder as Cash] valued at [ 200.00]


Blank lines that should be supressed show:
shares in valued at


which is that same if I had the text part outside the IF statement


Brilliant, thanks. I now understand the /f part and how to edit it!
I ended up with:
"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
M_2Shares /f
" shares in "}{ MERGEFIELD M_2InvestmentName /f " valued at
£"}{ MERGEFIELD M_2CurrentValue }" "Cash valued at £{ MERGEFIELD
M_2CurrentValue}" }


"Remainder as Cash" was in the Shares field but now I can remove this
and leave the field blank, which is neater. However I still don't
have this formulae able to supress itself if there is nothing in any
of the 3 fields. Any ideas on that please?


Not quite. The above suggestion gives me extra blank rows. I have
noticed that if on each line I simply have say the Shares field so the
first line is {MERGEFIELD M_1Shares} and the 5th line has {MERGEFIELD
M_5Shares} if the 4th and 5th Shares fields are blank then lines 4 and
5 do not appear at all. They are not blank, they simply vanish. If I
swap the simple merge fields for the complex IF statement then lines 4
and 5 are there but they are blank. Ideally I would like them to
"vanish" also. Hope that is clearer.


  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lester Lane[_2_] Lester Lane[_2_] is offline
external usenet poster
 
Posts: 5
Default Text appears when the fields are blank

On 6 Apr, 22:21, "Doug Robbins - Word MVP"
wrote:
It will be easier to sort this out if you can send me the mail merge main
document and some "dummy" records that cover the range of combinations of
data that you are trying to handle.

You can send it to dkr[atsymbol]mvps[dot]org

--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message

...

On 1 Apr, 22:33, "Doug Robbins - Word MVP"
wrote:
I am assuming that what you want to suppress is a blank line. *To do
that,
start the field construction at the end of the previous line and insert a
carriage return (or Shift +Enter) where the ¶ appears in the following
construction


{ IF { MERGEFIELD M_2InvestmentName } "cash" "¶
{ MERGEFIELD M_2Shares /f " shares in "}{ MERGEFIELD M_2InvestmentName
/f "
valued at
£"}{ MERGEFIELD M_2CurrentValue }" { IF { MERGEFIELD M_2CurrentValue }
0

Cash valued at £{ MERGEFIELD M_2CurrentValue}" "" } }


--
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, originally posted via msnews.microsoft.com


"Lester Lane" wrote in message


....


On 31 Mar, 22:29, "Doug Robbins - Word MVP"
wrote:
I think that your construction should be:


"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
"M_2Shares"
/f
" shares in "}{ MERGEFIELD M_2InvestmentName */f " valued at
"}{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue}" }


But, I am not sure about the negative result because in your field
construction, I do not see from where the "Remainder as Cash " comes.
--
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, originally posted via msnews.microsoft.com


"Lester Lane" wrote in message


...


Hi, I'm not sure if I have the right approach to this problem but
here
goes:


I can have up to 5 sets of fields with each set consisting of 3
fields
per record. *Some records only have say 3 sets. *On the letter each
set is a separate line. *For the 4th and 5th sets rather than get a
supressed row if I simply had one field on its own I end up with
some
of the text buried within the merge formula. *How can I change my
approach/formula to make sure rows 4 & 5 are totally supressed
please?


{ MERGEFIELD "M_2Shares" /f ""}{ IF { MERGEFIELD M_2InvestmentName }
"cash" " shares in { MERGEFIELD M_2InvestmentName */f ""} valued
at
{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue} }


Correct displays include:
9,764 shares in Edinburgh New Income Trust plc 1p ords (ENI) valued
at
4,064.75
Remainder as Cash valued at 200.00


Using [] to show field data:
[9,764] shares in [Edinburgh New Income Trust plc 1p ords (ENI)]
valued at [4,064.75]
[Remainder as Cash] valued at [ 200.00]


Blank lines that should be supressed show:
shares in *valued at


which is that same if I had the text part outside the IF statement


Brilliant, thanks. *I now understand the /f part and how to edit it!
I ended up with:
"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
M_2Shares /f
" shares in "}{ MERGEFIELD M_2InvestmentName */f " valued at
£"}{ MERGEFIELD M_2CurrentValue }" "Cash valued at £{ MERGEFIELD
M_2CurrentValue}" }


"Remainder as Cash" was in the Shares field but now I can remove this
and leave the field blank, which is neater. *However I still don't
have this formulae able to supress itself if there is nothing in any
of the 3 fields. *Any ideas on that please?


Not quite. *The above suggestion gives me extra blank rows. *I have
noticed that if on each line I simply have say the Shares field so the
first line is {MERGEFIELD M_1Shares} and the 5th line has {MERGEFIELD
M_5Shares} if the 4th and 5th Shares fields are blank then lines 4 and
5 do not appear at all. *They are not blank, they simply vanish. *If I
swap the simple merge fields for the complex IF statement then lines 4
and 5 are there but they are blank. *Ideally I would like them to
"vanish" also. *Hope that is clearer.


Thanks for the offer but I can't get your email to work - even with uk
at the end...
  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Text appears when the fields are blank

Replace the parts inside the [ ] with the obvious

--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message
...
On 6 Apr, 22:21, "Doug Robbins - Word MVP"
wrote:
It will be easier to sort this out if you can send me the mail merge main
document and some "dummy" records that cover the range of combinations of
data that you are trying to handle.

You can send it to dkr[atsymbol]mvps[dot]org

--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message

...

On 1 Apr, 22:33, "Doug Robbins - Word MVP"
wrote:
I am assuming that what you want to suppress is a blank line. To do
that,
start the field construction at the end of the previous line and
insert a
carriage return (or Shift +Enter) where the ¶ appears in the following
construction


{ IF { MERGEFIELD M_2InvestmentName } "cash" "¶
{ MERGEFIELD M_2Shares /f " shares in "}{ MERGEFIELD M_2InvestmentName
/f "
valued at
£"}{ MERGEFIELD M_2CurrentValue }" { IF { MERGEFIELD M_2CurrentValue }

0

Cash valued at £{ MERGEFIELD M_2CurrentValue}" "" } }


--
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, originally posted via msnews.microsoft.com


"Lester Lane" wrote in message


...


On 31 Mar, 22:29, "Doug Robbins - Word MVP"

wrote:
I think that your construction should be:


"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
"M_2Shares"
/f
" shares in "}{ MERGEFIELD M_2InvestmentName /f " valued at
"}{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue}" }


But, I am not sure about the negative result because in your field
construction, I do not see from where the "Remainder as Cash "
comes.
--
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, originally posted via msnews.microsoft.com


"Lester Lane" wrote in message


...


Hi, I'm not sure if I have the right approach to this problem but
here
goes:


I can have up to 5 sets of fields with each set consisting of 3
fields
per record. Some records only have say 3 sets. On the letter
each
set is a separate line. For the 4th and 5th sets rather than get
a
supressed row if I simply had one field on its own I end up with
some
of the text buried within the merge formula. How can I change my
approach/formula to make sure rows 4 & 5 are totally supressed
please?


{ MERGEFIELD "M_2Shares" /f ""}{ IF { MERGEFIELD
M_2InvestmentName }
"cash" " shares in { MERGEFIELD M_2InvestmentName /f ""}
valued
at
{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue} }


Correct displays include:
9,764 shares in Edinburgh New Income Trust plc 1p ords (ENI)
valued
at
4,064.75
Remainder as Cash valued at 200.00


Using [] to show field data:
[9,764] shares in [Edinburgh New Income Trust plc 1p ords (ENI)]
valued at [4,064.75]
[Remainder as Cash] valued at [ 200.00]


Blank lines that should be supressed show:
shares in valued at


which is that same if I had the text part outside the IF
statement


Brilliant, thanks. I now understand the /f part and how to edit it!
I ended up with:
"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
M_2Shares /f
" shares in "}{ MERGEFIELD M_2InvestmentName /f " valued at
£"}{ MERGEFIELD M_2CurrentValue }" "Cash valued at £{ MERGEFIELD
M_2CurrentValue}" }


"Remainder as Cash" was in the Shares field but now I can remove
this
and leave the field blank, which is neater. However I still don't
have this formulae able to supress itself if there is nothing in any
of the 3 fields. Any ideas on that please?


Not quite. The above suggestion gives me extra blank rows. I have
noticed that if on each line I simply have say the Shares field so the
first line is {MERGEFIELD M_1Shares} and the 5th line has {MERGEFIELD
M_5Shares} if the 4th and 5th Shares fields are blank then lines 4 and
5 do not appear at all. They are not blank, they simply vanish. If I
swap the simple merge fields for the complex IF statement then lines 4
and 5 are there but they are blank. Ideally I would like them to
"vanish" also. Hope that is clearer.


Thanks for the offer but I can't get your email to work - even with uk
at the end...


  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lester Lane[_2_] Lester Lane[_2_] is offline
external usenet poster
 
Posts: 5
Default Text appears when the fields are blank

On 12 Apr, 22:25, "Doug Robbins - Word MVP"
wrote:
Replace the parts inside the [ ] with the obvious

--
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, originally posted via msnews.microsoft.com

"Lester Lane" wrote in message

...

On 6 Apr, 22:21, "Doug Robbins - Word MVP"
wrote:
It will be easier to sort this out if you can send me the mail merge main
document and some "dummy" records that cover the range of combinations of
data that you are trying to handle.


You can send it to dkr[atsymbol]mvps[dot]org


--
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, originally posted via msnews.microsoft.com


"Lester Lane" wrote in message


....


On 1 Apr, 22:33, "Doug Robbins - Word MVP"
wrote:
I am assuming that what you want to suppress is a blank line. *To do
that,
start the field construction at the end of the previous line and
insert a
carriage return (or Shift +Enter) where the ¶ appears in the following
construction


{ IF { MERGEFIELD M_2InvestmentName } "cash" "¶
{ MERGEFIELD M_2Shares /f " shares in "}{ MERGEFIELD M_2InvestmentName
/f "
valued at
£"}{ MERGEFIELD M_2CurrentValue }" { IF { MERGEFIELD M_2CurrentValue }

0

Cash valued at £{ MERGEFIELD M_2CurrentValue}" "" } }


--
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, originally posted via msnews.microsoft.com


"Lester Lane" wrote in message


...


On 31 Mar, 22:29, "Doug Robbins - Word MVP"

wrote:
I think that your construction should be:


"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
"M_2Shares"
/f
" shares in "}{ MERGEFIELD M_2InvestmentName */f " valued at
"}{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue}" }


But, I am not sure about the negative result because in your field
construction, I do not see from where the "Remainder as Cash "
comes.
--
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, originally posted via msnews.microsoft.com


"Lester Lane" wrote in message


...


Hi, I'm not sure if I have the right approach to this problem but
here
goes:


I can have up to 5 sets of fields with each set consisting of 3
fields
per record. *Some records only have say 3 sets. *On the letter
each
set is a separate line. *For the 4th and 5th sets rather than get
a
supressed row if I simply had one field on its own I end up with
some
of the text buried within the merge formula. *How can I change my
approach/formula to make sure rows 4 & 5 are totally supressed
please?


{ MERGEFIELD "M_2Shares" /f ""}{ IF { MERGEFIELD
M_2InvestmentName }
"cash" " shares in { MERGEFIELD M_2InvestmentName */f ""}
valued
at
{ MERGEFIELD M_2CurrentValue }" "valued at { MERGEFIELD
M_2CurrentValue} }


Correct displays include:
9,764 shares in Edinburgh New Income Trust plc 1p ords (ENI)
valued
at
4,064.75
Remainder as Cash valued at 200.00


Using [] to show field data:
[9,764] shares in [Edinburgh New Income Trust plc 1p ords (ENI)]
valued at [4,064.75]
[Remainder as Cash] valued at [ 200.00]


Blank lines that should be supressed show:
shares in *valued at


which is that same if I had the text part outside the IF
statement


Brilliant, thanks. *I now understand the /f part and how to edit it!
I ended up with:
"{ IF { MERGEFIELD M_2InvestmentName } "cash" "{ MERGEFIELD
M_2Shares /f
" shares in "}{ MERGEFIELD M_2InvestmentName */f " valued at
£"}{ MERGEFIELD M_2CurrentValue }" "Cash valued at £{ MERGEFIELD
M_2CurrentValue}" }


"Remainder as Cash" was in the Shares field but now I can remove
this
and leave the field blank, which is neater. *However I still don't
have this formulae able to supress itself if there is nothing in any
of the 3 fields. *Any ideas on that please?


Not quite. *The above suggestion gives me extra blank rows. *I have
noticed that if on each line I simply have say the Shares field so the
first line is {MERGEFIELD M_1Shares} and the 5th line has {MERGEFIELD
M_5Shares} if the 4th and 5th Shares fields are blank then lines 4 and
5 do not appear at all. *They are not blank, they simply vanish. *If I
swap the simple merge fields for the complex IF statement then lines 4
and 5 are there but they are blank. *Ideally I would like them to
"vanish" also. *Hope that is clearer.


Thanks for the offer but I can't get your email to work - even with uk
at the end...


Ironically it would seem that your postmaster does not like Word
attachments!! I have put them in a zip....
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blank fields in Excel to Word mailmerg appears as 0, how do I mak. fredcfc Mailmerge 1 November 19th 08 02:04 PM
unwanted text appears in every blank new document drjdwj Microsoft Word Help 2 July 13th 08 07:28 AM
Document appears to be blank Sandi Microsoft Word Help 1 June 25th 06 10:37 AM
How to use mail merge to send out a form with blank text fields? Gwendolyn Mailmerge 1 November 17th 05 05:16 AM
Text box appears in print view but prints blank? Jamin Microsoft Word Help 1 October 5th 05 06:43 PM


All times are GMT +1. The time now is 05:00 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"