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 entire line base on a returned value



 
 
Thread Tools Display Modes
  #1  
Old January 27th 17, 05:08 PM
Nightofthehawk Nightofthehawk is offline
Junior Member
 
First recorded activity by WordBanter: May 2016
Posts: 1
Default 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
Ads
 




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
Why won't mail merge use the entire data base? Aerial34 Mailmerge 1 November 1st 09 08:59 PM
Macro to find text, then delete entire line containing the text? Tailings Microsoft Word Help 2 September 16th 06 03:52 AM
word tables delete default should be delete entire row not shift littleleaves Tables 1 August 15th 06 05:39 AM
My delete key deletes entire words...cannot delete letters secaneta Page Layout 1 July 25th 06 05:51 PM
How do I delete an entire line in Word? J.R. Aiello Microsoft Word Help 1 January 11th 06 09:40 PM


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


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