A family of Microsoft word processing software products for creating web, email, and print documents.
How come every reply to Microsoft Answers makes me feel like I am having a stroke.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I've searched and searched but have not come up with anything that works.
Here's the scenario.
I use a program called ServiceM8 which has a "Forms" section. I have a "form" which asks a bunch of questions, which can be simple yes/no answers or text fields and can add photos and then it generates a PDF report from a word template.
The word template I have has a bunch of mergefields. - { MERGEFIELD image_form_photos_of_areas_not_inspected_medium \* MERGEFORMAT } which will show a photo that has been selected and will show in the pdf report.
However, if there is no photo selected in the form, the report will generate a blank line for the document.
Sometimes I have 10 of these mergefields for photos (2 per line so photos show side by side) and the mergefields are above the other in the report) and the report it produces has 5 blank lines so the report has huge gaps between the text.
Is there a way to format the mergefields so if they are "false" and don't have a photo attached then the word document doesn't show a blank line?
A family of Microsoft word processing software products for creating web, email, and print documents.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
How come every reply to Microsoft Answers makes me feel like I am having a stroke.
I am not sure why you 3 sets of records -15, -16, -17 as it would be more normal just to have
«AddresseeSalutation\_Donor\_Addressee»
«Address_Donor_Address_line_1»
«Address_Donor_Address_line_2»
«Address_Donor_City», «Address_Donor_State» «Address_Donor_ZIP_Code»
and, if you want to suppress the address fields if they are blank, use
«AddresseeSalutation_Donor_Addressee»{ IF { MERGEFIELD Address_Donor_Address_line_1 } <> "" "¶
«Address_Donor_Address_line_1»
«Address_Donor_Address_line_2»
«Address_Donor_City», «Address_Donor_State» «Address_Donor_ZIP_Code»" }
You must use CTR:+F9 to insert each pair of field delimiters { } and press the Enter key where the ¶ appears at the end of the first line.
That may be an application for the Many to One facility on my Merge Tools Add-in that is contained in the MERGE TOOLS ADD-IN.zip file that you can download from:
Extract the files from the archive and read the:
“READ ME – Setting up and using the Merge Tools Add-in.pdf
to see how to install and use the various tools.
Using those tools, it is possible to perform the following types of merge that cannot be done with Mail Merge “out-of-the-box”:
The requirements for using the system are:
The MergeTools Add-in will NOT work with the “New Outlook”, which is just a re-badged version of Windows Mail and like its predecessor, it does not support automation and hence will not send the messages created by the MergeTools Add-in.
Be aware, that any messages that you had tried to send with the “New Outlook” will have been placed in the Outbox of the original Outlook and they will be sent as soon as you revert to that version of Outlook. If you do not want that to happen, you should put Outlook Off-line, or disconnect your computer from the Internet.
Is it possible to add or eliminate rows of a table using this or something similar? If I have a table for various elements but not all records I'm importing have the same number of those elements, can the table expand/contract to accommodate? The elements are set up as columns in the source file and can range from 1 to 5 combinations. I'd rather not have a 5 row table on my merge document as that takes up a lot of space and leaves it looking as though something is missing
| Desc. | Attribute 1 | Attribute 2 | Attribute 3 |
|---|---|---|---|
| desc 1 | data | data | data |
| empty | empty | empty | empty |
Hello
I’m Adeyemi and I’d be happy to help you with your question. In this forum, we are Microsoft consumers just like yourself.
Yes, there is a way to suppress blank lines in Word when using merge fields.
One way to do this is by toggling the field codes in the mail merge document so that merge fields are presented in the following manner: {MERGEFIELD *Field_name*}.
You can accomplish this by pressing Alt+F9. Then, remove any carriage returns and spaces between the merge field that you want to be suppressed if it is blank and the previous merge field. Finally, insert the following text within the merge field at the closing bracket: \\b " ".
Another way to suppress blank lines when a merge field is empty is by using an IF field. For example, if you have an Address1, Address2, City, State, and Zip fields and there may be no data in the Address2 field, you can use the following field construction: { MERGEFIELD Address1 } { IF { MERGEFIELD Address2 } <> \"\" \" { MERGEFIELD Address2 }¶ { MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Zip }\" \" { MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Zip }\" }. You must use CTRL+F9 to insert each pair of field delimiters and you use Alt+F9 to toggle off their display. Where the ¶ appears above, press Enter or Shift+Enter.
I hope this helps! 😊
You can check these similar conversations too: https://answers.microsoft.com/en-us/msoffice/forum/all/eliminating-blank-lines-in-mail-merge-if-fieldis/eeecb934-e23d-4dfb-9e98-f23e13436a32. https://answers.microsoft.com/en-us/msoffice/forum/all/mail-merge-how-to-suppress-blank-lines/2039a43b-9c84-4423-abf2-3213043ae4b3.