Microsoft Office Word Forum - WordBanter

Microsoft Office Word Forum - WordBanter (http://www.wordbanter.com/index.php)
-   Mailmerge (http://www.wordbanter.com/forumdisplay.php?f=6)
-   -   Delete entire line base on a returned value (http://www.wordbanter.com/showthread.php?t=156579)

Nightofthehawk January 27th 17 06:08 PM

Delete entire line base on a returned value
 
I've read a number of posts to remove a line based on a no value being returned but can't find out how to remove based on a specific value being returned.
e.g.
I have a merge line below where 'UK Equity' is text
UK Equity { =100* { MERGEFIELD BenchUK2 } \# "0.0%" }

Currently, if the value returned is 0.0% the merge shows
'UK Equity 0.0%'
However, if the value returned is 0.0% I wish to delete the whole line including the text 'UK Equity' and don't want to see a blank line.

I realise I need an IF statement but I can't find the instruction to delete the line.
I think I need something like this:
UK Equity { IF { =100* { MERGEFIELD BenchUK2 } \# "0.0%" } = 0.0% { 'delete the entire line including the text UK Equity'}

NB. I think I may need an instruction like shift + home + delete, but don't know anything about VBA and how to apply it to the field codes.

Thanks if you can help

Mike


All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
WordBanter.com