Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 113
  • Last Modified:

Mail merge, suppression of entire paragraphs

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
BlosMusic
Asked:
BlosMusic
  • 6
  • 5
1 Solution
 
FarWestCommented:
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
 
BlosMusicAuthor Commented:
Can this be done without the documents being on general public view?
0
 
FarWestCommented:
please check your messages
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
BlosMusicAuthor Commented:
I've done this. Not sure if it went, but anyway, if you don't get something let me know.
Many thanks.
Regards,
0
 
FarWestCommented:
got it, I will look at the files now
0
 
FarWestCommented:
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
 
BlosMusicAuthor Commented:
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
 
FarWestCommented:
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
 
BlosMusicAuthor Commented:
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
 
BlosMusicAuthor Commented:
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
 
BlosMusicAuthor Commented:
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!

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now