Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-04-2019, 08:32 AM
tommatwalker tommatwalker is offline Use of the SkipIf Function Windows 10 Use of the SkipIf Function Office 2016
Novice
Use of the SkipIf Function
 
Join Date: Jul 2018
Posts: 5
tommatwalker is on a distinguished road
Default Use of the SkipIf Function

Hi all,

I am currently attempting to use mail merge to generate a number of tables in a document. I need to generate a table but not add a row where that row would be blank? I.e. where a certain piece of mail merge is empty then to ignore that entry and skip to the next row. I am lead to believe that this may be possible with SKIPIF but I can't seem to get this to do anything? I have included my code below:

{SKIPIF {MERGEFIELD step_45_7}=""}

I have added everything using Ctrl+F9 but am relatively inexperienced at this sort of thing so any advice is gratefully received!



Thanks

Tom
Reply With Quote
  #2  
Old 01-15-2019, 01:16 PM
macropod's Avatar
macropod macropod is offline Use of the SkipIf Function Windows 7 64bit Use of the SkipIf Function Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can use Word's Catalogue/Directory Mailmerge facility for this (the terminology depends on the Word version). To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial, in the 'Sticky' thread at the top of this forum:
https://www.msofficeforums.com/mail-...-tutorial.html
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.

Depending on what you're trying to achieve, the field coding for this can be complex. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. For some worked examples, see the attachments to the posts at:
https://www.msofficeforums.com/mail-...html#post23345
https://www.msofficeforums.com/mail-...html#post30327

Another option would be to use a DATABASE field in a normal ‘letter’ mailmerge main document and a macro to drive the process. An outline of this approach can be found at: http://answers.microsoft.com/en-us/o...1-1996c14dca5d
Conversely, if you're using a relational database or, Excel workbook with a separate table with just a single instance of each of the grouping criteria, a DATABASE field in a normal ‘letter’ mailmerge main document could be used without the need for a macro. An outline of this approach can be found at:
https://answers.microsoft.com/en-us/...f-8642e46fa103
For a working example, see:
https://www.msofficeforums.com/mail-...-multiple.html

The DATABASE field can even be used without recourse to a mailmerge. An example of such usage can be found at: https://www.msofficeforums.com/mail-...html#post67097

Yet another option would be to use a macro to delete unused rows at the end of a standard merge. For an example of that approach, see: https://www.msofficeforums.com/mail-...tml#post137121

Alternatively, you may want to try one of the Many-to-One Mail Merge add-ins, from:
Graham Mayor at http://www.gmayor.com/ManyToOne.htm; or
Doug Robbins at https://onedrive.live.com/?cid=5AEDC...43615E886B!566
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of the SkipIf Function VBA code to save to individual files and skipif function beefcake2000 Mail Merge 2 12-05-2017 03:19 AM
Use of the SkipIf Function [Word 2016 for Mac] SKIPIF condition doesn't work rschnell Mail Merge 3 10-19-2017 02:01 PM
Use of the SkipIf Function Restrict Editing function disable insert textbox function IanM_01 Word 5 11-21-2015 02:29 AM
Use of the SkipIf Function #REF! Error in calling VBA function disappears when function is copied lcaretto Excel Programming 2 05-26-2014 07:19 PM
Use of the SkipIf Function Word vs Excel (NEXTIF, SKIPIF mergefield) jerry00769 Mail Merge 3 04-30-2012 03:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft