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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate: How to...
Power Automate
Suggested Answer

Power Automate: How to refresh Word field codes before PDF conversion with SharePoint metadata?

(0) ShareShare
ReportReport
Posted on by

Problem Summary:

 

I need to automatically convert Word documents to PDF in Power Automate, but the Word documents contain field codes (e.g., {DOCPROPERTY "DocumentOwner"}) that reference SharePoint metadata. When the PDF is generated, these field codes are not refreshed, resulting in PDFs with outdated metadata values.

 

 

Environment:

  • SharePoint Online document library
  • Power Automate Cloud Flows
  • Microsoft 365 E3 licenses
  • Word documents with {DOCPROPERTY} field codes
 

 

Current Situation:

 
  1. SharePoint Setup:

    • Document library with custom columns (DocumentOwner, Location, Version, etc.)
    • Word documents stored in this library
  2. Word Documents:

    • Contain field codes like {DOCPROPERTY "DocumentOwner"}
    • These fields are linked to SharePoint document properties
    • When opened in Word Desktop: Fields refresh automatically ✅
    • When opened in Word Online: Fields do NOT refresh ❌
  3. Power Automate Flow:

   Trigger: When SharePoint metadata is modified
   → Get file properties
   → Get file content
   → Convert to PDF (various methods tried)
   → Save PDF
 

 

The Problem:

 

When a user updates SharePoint metadata (e.g., DocumentOwner changes from "John" to "Sarah"):

  • The Word document is NOT opened
  • The PDF conversion happens automatically via Power Automate
  • Result: PDF shows old value "John" instead of "Sarah" ❌
 

The field codes only update when the document is manually opened in Word Desktop App.

 

 

What I've Tried:

 
  1. Standard "Convert Word to PDF" action: Field codes not refreshed
  2. Premium "Convert Word Document to PDF" action: Unclear if this refreshes field codes (evaluating)
  3. Word Online Connector "Populate a Word template": Requires Content Controls (would need to rebuild all templates)
  4. Third-party (Encodian): Testing, but want to explore native Microsoft solutions first
 

 

My Questions:

 
  1. Does the Premium "Convert Word Document to PDF" action automatically refresh Word field codes before conversion?

  2. Is there a native Power Automate action that can:

    • Refresh/update Word field codes in a document?
    • Or update Word document properties so field codes reflect current SharePoint values?
  3. Alternative approach: Should I abandon {DOCPROPERTY} field codes and switch to Content Controls + Word Online Connector?

    • If yes: Any way to bulk-convert existing documents?
  4. Licensing: If using Premium actions:

    • Who needs a Power Platform Premium license?
    • Only the flow owner or every user who triggers the flow?
 

 

Ideal Solution:

 

A way to automatically refresh Word field codes (or update document properties) in Power Automate before PDF conversion, so that:

  • PDFs always show current SharePoint metadata ✅
  • Word documents retain field codes for manual editing ✅
  • No manual document opening required ✅
 

 

Additional Context:

 

We have hundreds of existing documents with {DOCPROPERTY} field codes. Rebuilding all templates with Content Controls would be very time-consuming, so a solution that works with existing field codes would be preferred.

 

Any guidance on the best Microsoft-native approach would be greatly appreciated!

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at
     
    A workaround could be to run an attended or unattended desktop flow from your cloud flow and open the document and run the Ctrl+A + F9 key combination.
     
    However, that also requires additional setup, so still not ideal. Imho replacing the doc properties with Content controls would be still my favourite option. That sounds like the more future proof approach.
     
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 604

#2
Valantis Profile Picture

Valantis 502

#3
Vish WR Profile Picture

Vish WR 417

Last 30 days Overall leaderboard