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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Agent to generate Word...
Copilot Studio
Suggested Answer

Agent to generate Word documents corrupting characters

(0) ShareShare
ReportReport
Posted on by

I’m building a Copilot Studio agent that creates Word (.docx) files from natural language. When the content is large, the generated file shows strange characters like –, Ã, é instead of proper dashes and accented letters (Portuguese text).

I tried reopening with UTF‑8, using Notepad/Notepad++, and paste options, but nothing worked.

Question:
How can I ensure the Word files generated by Copilot Studio use the correct encoding (UTF‑8/Unicode) and avoid these corrupted characters? Any best practices or recommended approach?

I have the same question (0)
  • Suggested answer
    Romain The Low-Code Bearded Bear Profile Picture
    2,122 Super User 2025 Season 2 on at
    hello,
     
    i have come throught multiple document creation : image, excel, power point. To be honest, word will be my next try next week.
     
    What i can share you throught all my test.
     
    I recommand you to use the Prompt from tools (AKA Ai Builder prompt), enable code interpreter and then go to GPT 5 Chat (not reasoning, it will timeout)
     
    I don't recommand from copilot studio directly, i recommand from AI Builder prompt and use it inside a flow, this way you will
    - test in AI builder,have a very big prompt windows, and when the result is stable, the generated code will be lock when clicking on save button, this way you will 100% accurate result every time
    - since it will generate python : use another AI tool to help you like copilot or last version of GPT 5.2 wich is good enough to help in this case : explain the case, give the desired file, give the result, the prompt, the generate code and then the AI will help you build a prompt for AI builder wich all request abouht the code generation to avoid this kink of problem
    - then save and use an agent flow to get the file in base 64 and save it wher eyou wan t (often in one drive of the user, it s great to keep track)
     
    i recommand you this content wich is with excel but quiest near : https://www.youtube.com/watch?v=JMlUcxqnU30
     
    last suggestion : when i made pptx generation i found myself that the python was very sensitive of the quality of the hidden layout of the pptx. I think for word it will be nearly same, the police layout (title 1, subtitle 1 etc) will need to be perfect too.
     
    if this help you to resolve the case, please mark the answer as verified, it's important for the community :)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 250 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 197 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 103 Moderator

Last 30 days Overall leaderboard