Solved

Mail merge, suppression of entire paragraphs

Posted on 2015-02-02
11
64 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
  • 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
 

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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

To stay competitive, modern businesses must adapt and stay innovative, and this is increasingly only possible by working with outside talent. Managers and executives have understood the power of outsourcing for quite some time, but traditional clien…
Meetings to discuss business process can waste time, and often do .  The meeting's dialog can get confusing when participants have different professional perspectives and backgrounds.  A jointly-developed process picture helps wade through the confu…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now