Skip to main content

Notifications

Community site session details

Community site session details

Session Id : +Z0vfhUx5xHDGSZxuSAD+n
Power Apps - Building Power Apps
Answered

Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

Like (0) ShareShare
ReportReport
Posted on 7 Nov 2023 13:47:08 by 309

I have a curious situation when using a pre-defined process to populate a Word Template and circumvent the premium connector - which has been well documented on the site:

When a new Word document is produced using Quick Parts and the SharePoint List elements - then copied across to a new location and sent to an email recipient - if they view the resultant Word Document in Preview Mode (in Outlook), it displays the previous Quick Part records in the Preview:

AdamGill1965_0-1699364507100.png

 

If you subsequently open the same attached document In Word, it shows the correct details for the existing user (in this example, the user has not completed their Profile, so the form is blank - as anticipated):

AdamGill1965_2-1699364705451.png

 

Is there a step I am missing? Should I clear down the SharePoint List Columns prior to inserting/replacing my Word Template - or perhaps there is something else..?

Any pointers would be greatly appreciated - thanks!

 

  • AdamGill1965 Profile Picture
    309 on 07 Feb 2024 at 12:49:20
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    I used the same guide from YouTube..... My problem was that the end document was using a Template that already had Values inserted into the Fields and they were not being replaced by my Flow process.

     

    In the YouTube video - you should notice that every time he has the Word Document open, it is in his Desktop App - not Word Online. As far as I can tell - with Word Online - it appears to be "aware" of the data source and therefore shows the Fields, rather than the Results in those Fields. However, if you open the same document in the Microsoft Word Desktop App, it shows the Results, in place of the Fields.

     

    I'm not sure if this will help you - it is just what I have gathered as I created my own version of this solution.

  • AdamGill1965 Profile Picture
    309 on 07 Feb 2024 at 12:48:36
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    I used the same guide from YouTube..... My problem was that the end document was using a Template that already had Values inserted into the Fields and they were not being replaced by my Flow process.

     

    In the YouTube video - you should notice that every time he has the Word Document open, it is in his Desktop App - not Word Online. As far as I can tell - with Word Online - it appears to be "aware" of the data source and therefore shows the Fields, rather than the Results in those Fields. However, if you open the same document in the Microsoft Word Desktop App, it shows the Results, in place of the Fields.

     

    I'm not sure if this will help you - it is just what I have gathered as I created my own version of this solution.

  • gstlouis Profile Picture
    on 30 Jan 2024 at 16:04:07
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    Hi 
    It looks like I have the same problem.  I had a word template that I used and put in quick parts, which content type replaces the quick parts placeholders when I use automate to create a new file with this template.  If I use the PDF viewer to view the file, I can see the data entries.  But when I click on the new created document to view in browser it actually shows me the quick parts!?  If I send this file in an email with automate I have the data entries.  Why is it I see the quick parts and not the entries when I open the document in the browser?

     

    I'm not sure I understand what you mean by "My original Word Template contained Values in the Quick Parts Fields in the core document"
    Can you explain some more about this?

     


    I used this video to do the setup 
    https://www.youtube.com/watch?v=C-DU1VYYa_0

  • Verified answer
    AdamGill1965 Profile Picture
    309 on 09 Nov 2023 at 13:57:16
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    I finally realized my error: My original Word Template contained Values in the Quick Parts Fields in the core document. Once I removed those, then reformatted the fonts how I wanted them and left them as blank, the issue was resolved.

  • AdamGill1965 Profile Picture
    309 on 09 Nov 2023 at 09:54:23
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    I'm not sure if it is etiquette here to be able to bring up my post (BUMP) but the guidance provided so far has not resolved my issue and I would like to give others the opportunity to provide input, feedback or advice - thanks!

  • AdamGill1965 Profile Picture
    309 on 08 Nov 2023 at 21:44:00
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    Thank you but your extensive notes do not take into consideration the fact that I am avoiding premium connectors in my Flow. I will continue to research but thank you!

  • MudassarSZ365 Profile Picture
    591 on 08 Nov 2023 at 13:27:57
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    @AdamGill1965 

    Here are some steps you can incorporate into your Power Automate Flow:
    Refresh Content Controls: Add a step in your flow that opens the Word document and updates the content controls (Quick Parts). Unfortunately, Power Automate does not have a built-in action for this. You would typically need to use a custom connector or an Azure Function to run a script that opens the Word document, refreshes all fields, and then saves the document.

    Use Word Online Business Connector: If you have access to Word Online (Business) connector, there is an action called “Populate a Microsoft Word template” which allows you to create a Word document from a Word template and populate content controls with dynamic data from your flow. You can then create a document with fresh data pulled from your SharePoint List.

    Convert to PDF: Since PDFs are static and won't have the Quick Parts update issues, consider adding a step to convert the Word document to a PDF once it's ready. This can be achieved with the "Convert Word Document to PDF" action in Power Automate. This way, you ensure the receiver views the document content as intended.

    Remove Quick Parts Programmatically: If you have the capability, write a custom script (using Azure Functions or Automation Runbooks) that programmatically removes or updates Quick Parts from the Word document. This script can be called from Power Automate using the HTTP action.

    Check In/Check Out Document: If you're working with SharePoint document libraries that have versioning and check-in/check-out enabled, make sure to add steps in your flow to check out the document before making changes and check it in afterward.

    Manual Trigger to Refresh Data: As a workaround, you could create a manual trigger (button or similar) in your app that the user must press to update the data. This would be a temporary fix and not an automated solution.

    Set Document Properties: You may need to add or modify the document properties (metadata) before generating the final document to ensure that all the fields are populated with the correct data.

    Here’s a simplified example of what the flow steps could look like:

    When a SharePoint list item is modified or created, trigger the flow.
    Use the “Get item” action to retrieve the current data from the SharePoint List.
    Use the “Populate a Microsoft Word template” action from the Word Online (Business) connector to create your document with the fresh data.
    If necessary, add a custom script action to refresh fields or remove Quick Parts.
    Convert the Word document to PDF for static content.
    Create an email with the PDF attached using the “Send an email (V2)” action.
    (Optional) Update the SharePoint list item to reflect the document’s creation and sent status.
    Always test your flow thoroughly to ensure that the documents generated have the correct, up-to-date information before being sent out to the end-users.

    Kindly mark the solution as accepted if it resolves your issue.

    Best Regards
    Muhammad Mudassar Mazhar

  • AdamGill1965 Profile Picture
    309 on 08 Nov 2023 at 10:46:16
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    Thank you - I understand these notes, however the processing is compiled in a Microsoft Power Automate Flow. Which Step(s) would you advise I compile to achieve the stripping out of Quick Part elements on the final document to be sent to the user?

  • AdamGill1965 Profile Picture
    309 on 08 Nov 2023 at 10:46:04
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    Thank you - I understand these notes, however the processing is compiled in a Microsoft Power Automate Flow. Which Step(s) would you advise I compile to achieve the stripping out of Quick Part elements on the final document to be sent to the user?

  • Hassan_SZ_365 Profile Picture
    542 on 07 Nov 2023 at 14:02:54
    Re: Using Quick Parts and SharePoint List Columns Process - Preview Document shows Previous Entries?

    Hi,


    If Outlook is showing old data in the preview of your Word document created with Quick Parts and SharePoint List columns, here are steps to fix it in simple terms:

    Refresh Data: Before sending the document, right-click on each Quick Part and choose 'Update Field' to make sure it's showing the latest information.

    Clear Old Data: After creating a document, go back to the SharePoint List and clear out the data that you don't need anymore. This prevents old data from showing up in new documents.

    Save Changes: Double-check that your document is saved after all updates. If you move the document to a new location, open it to make sure it refreshes the data before sending.

    Avoid Caching Issues: Change the file name for each new document to help Outlook understand it's a different file. This way, it won't show old preview data from its cache.

    Check Outlook Settings: Make sure there aren't any Outlook settings or add-ins that are caching previews of your documents.

    Send Correctly: If you’re using a script or a workflow to send the document, ensure it's set to wait until the document is fully updated and saved.

    This approach should help ensure that the Outlook preview displays the current information, just like when the document is opened in Word.

     

    Best Regards,
    Hassan Raza

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 27

#2
mmbr1606 Profile Picture

mmbr1606 14 Super User 2025 Season 1

#3
EE-04041031-0 Profile Picture

EE-04041031-0 11

Overall leaderboard
Loading started