Solved

Mail merge, suppression of entire paragraphs

Posted on 2015-02-02
11
86 Views
Last Modified: 2015-12-06
I am doing a merge into a Word document of data from an Excel spreadsheet. My merged Word document is formatted as a number list (say 12 numbered sections, each of which contains fields from  the spreadsheet). I have no problems with doing this, but I want, as and when I require it, to suppress some of those numbered sections entirely. What happens at the moment, quite correctly, is that I produce a Word document with all the required fields putting the correct data into my Word doc., and all is well. However, I want, quite frequently, to only show say sections 1,3,5,6,7 and 9 on my Word doc. Although these sections will all have their fields correctly filled in from the spreadsheet, I don't want to show them in my Word doc.
Hope that's clear. So I feel I am now a dab hand at doing the fields, but I have no idea of how to automatically, and on my command (somehow) suppress these sections when I want to in Word, or even if it's possible. Is it possible, and if so, how? Oh, and maybe also renumber these paragraphs after suppressing the bits I don't want, so that the numbering is then, again, continuous, rather than having missing numbers 2,4 and 8.
Many thanks,
Regards.
0
Comment
Question by:BlosMusic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 12

Expert Comment

by:FarWest
ID: 40583767
could you upload a sample files for word and spreadsheet,
I think part of the solution is to modify the way things are organized in the document
0
 

Author Comment

by:BlosMusic
ID: 40583923
Can this be done without the documents being on general public view?
0
 
LVL 12

Expert Comment

by:FarWest
ID: 40584115
please check your messages
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:BlosMusic
ID: 40584144
I've done this. Not sure if it went, but anyway, if you don't get something let me know.
Many thanks.
Regards,
0
 
LVL 12

Expert Comment

by:FarWest
ID: 40584179
got it, I will look at the files now
0
 
LVL 12

Expert Comment

by:FarWest
ID: 40584297
hi, do you consider price,payment terms, supply as sections so you want for example to hide payment terms section?

BTW I think you only use mail merge for first record is this correct?(not for all 7 that includes in example, is this correct?
0
 

Author Comment

by:BlosMusic
ID: 40584362
No, typically I only want to suppress paragraphs 3-7, or some of those. I will almost always have paragraphs 1 and 2. And, no, I shall always want the payment terms and prices. But again, I might want to suppress some of the price items (e.g. local control panel, instrumentation, etc.).
As regards your second comment about  using mail merge only for the first record: no, I use them in all the paragraphs (wherever you see the «field» signs, of course).
The summary is that I just want to be able to suppress any of the actual paragraphs 1 to 7 (it's unfinished, so there will be more) at will. I know that the merge fields will still be there, but I want to stop the document displaying the numbered paragraphs I don't want. You will realize that I am trying to make an all-singing merge document that will enable my staff to generate an accurate quotation based on a complex set of data, as quickly as possible. Sometimes there will not be 'fans', sometimes no 'pipes' . . . . and so on.
0
 
LVL 12

Accepted Solution

by:
FarWest earned 500 total points
ID: 40584459
so you mean by section a mail merge document output?
if general I tried this code use ctrl-F9 and type between brackets , of course you can store values in the excel sheet it self and use it as merged field"
{IF { {MERGEFIELD Print_Payment} = 1 "copy and paste all payment text including paragraph number" ""}

and if you keep paragraph numbering auto from word it will renumber based on its visibility

but the best way to get where you want (calculation sheet to produce a word quotation is to make  final tables layout including text paragraph in the excel itself then copy and paste those tables to word as linked table,
and if you want printable Quotation and not word you may consider printing directly from excel
0
 

Author Comment

by:BlosMusic
ID: 40588177
Thanks. I am now looking into how to do this - seems complicated, but the trouble is I know nothing about MERGEFIELDS; so I shall learn about it, try it, and shout again as and when i get into a tangle!
Thanks again.
0
 

Author Comment

by:BlosMusic
ID: 40588976
Well, I've done it quite well, I think. But can you tell me how to remove a blank line when one of the paragraphs is empty?
I have used CONCATENATION to build up a paragraph in Excel, as you recommended, and that all works perfectly. But if this paragraph, which I can suppress now, isn't there, then I end up with an extra, ugly-looking, blank line in the Word document. How can i get rid of this line, so it is only there when the particular paragraph is used?
0
 

Author Closing Comment

by:BlosMusic
ID: 41358371
I never closed this question, but the answer was good!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lately there has been a variety of news related to U.S. employment.  Stories about worker productivity, automobile and airline unions, low employment and foreign laborers have frequented the news.  Each story has good and bad attributes we might arg…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question