web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Word template conditional line breaks

(0) ShareShare
ReportReport
Posted on by 10

I'm trying to format a Word template to include a customer address, made up of individual address fields.

I have tried using the composite address field; however, even with the "Allow carriage returns (multiple paragraphs)" property set on the content control field, the line breaks are not preserved/rendered.

I have tried to use conditional merge field logic, to wrap the content control field but these are removed when the template is saved.

Any suggestions would be greatly received.

Many thanks

I have the same question (0)
  • LuHao Profile Picture
    40,892 on at

    Hi Andy,

    I am afraid this is by design and we cannot achieve conditional line breaks.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Andy,

    If I understand your need, I have been able to do this before. 

    Let's say you have address fields addressline1, addressline2, city, state, zip and on your Word template, you only want the fields that are filled in to show.

    First, create a multi-line text field called something like TemplateAddress.

    Then, create a process that is triggered on update of any of your address fields (addressline1, addressline2, city, state, zip).

    In this process, first clear the TemplateAddress field, then use conditional statements to add only the filled in address fields to the TemplateAddress field.  

    So your workflow would be something like:

    1. Clear TemplateAddress field
    2. If addressline1 contains data
      1. Append address line 1 to TemplateAddress field.
    3. If addressline2 contains data
      1. Append a line break plus address line 2 to TemplateAddress field.
    4. If city contains data
      1. Append a line break plus city to TemplateAddress field.
    5. etc...

    Now, in your Word Template, instead of including the individual address fields, just include the TemplateAddress field.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 81 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans