Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Mail Merge from Excel to Word

(2) ShareShare
ReportReport
Posted on by 261
Hi 
 
Please help me if you can.  I have built a flow to merge data from Excel to a Word Letter template
 
My address columns in Excel are Street and House Number, Second Address Line and Postal Code.
 
Some of the values in the columns may be empty and I am trying to ensure that if there are any null values that the address lines in Word have no gaps due to the null values
 
I have created variables for each address line but I am struggling with the final compose.
 
I need the address to appear in Word such as the example below: -
 
1 Test Road
Finchley
London
SW1 
 
or if Finchley was missing in the Excel data then it should appear as:-
 
1 Test Road
London
SW1
 
Many thanks for any help you can provide
  • Suggested answer
    Ciaran Profile Picture
    261 on at
    Mail Merge from Excel to Word
    Hi please accept my apologies for not providing enough information.
     

    The Word Document is addressed as below:-

     

    ​​Form of address.​ ​First Name​ ​Surname​ 

    ​​Street and House Number​ 

     

     The Street and House Number merge field above is taken from 4 individual spreadsheet columns, listed below:-

     

    Street and House Number Second Address Line District Postal Code
           

     

    My flow is as follows:

     

    The variables are initialised and set as listed below for the 4 address fields

     

     

    The flow then Sets the variables and populates the Word Document as set out below:-

     

     

    I want the flow to populate the Street and House Number field from the data from the 4 Excel Spreadsheet columns

     

     

    When I try to concat the address it is coming out on the same line eg 1 Test Road Finchley London SW1

     

    I need it to be 

     

    1 Test Road

    Finchley

    London

    SW1

     

    In the absence of any data I also want the address to have no gaps between the rows for example if the second line of address was missing it should appear as

     

    1 Test Road

    London

    SWI

     

    I had previously set the template up to merge each address individually onto the Word document ie.

     

    Street and House Number (1 Test Road)

    Second Line of Address (Finchley)

    District (London)

    Postal Code (SW1)

     

    However, when I ran the flow and data is missing gaps appear in the address. For example if the second line of address was missing it appears as

     

    1 Test Road

     

    London

    SW1

     

    This makes the letter look unprofessional and I am hoping to get advice on how to achieve this.

     

    Thank you for taking the time to read this and offer help as I have exhausted YouTube and AI chat bots trying to solve this.

  • Suggested answer
    Michael E. Gernaey Profile Picture
    43,479 Super User 2025 Season 1 on at
    Mail Merge from Excel to Word
    Hi,
     
    I completely stopped when you said "I built at flow".
     
    you shared nothing at all, yet expect we can help you. Why? When someone comes to you for help do they just say I have an issue, ok fix it, but don't share anything?? I doubt it.
     
     
    A picture of what you want in the Word document to make sure we can help is super important, what does no gaps mean.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492