A Copilot agent can create Word documents on your company’s branded template. Upload the template to the agent’s knowledge, turn on the Create documents, charts, and code capability (code interpreter), and name the template by its exact file name in the instructions. When you ask for a Word document, the agent writes and runs code that builds the file on your template, so the header, logo, footer and heading styles come through.
The agent can only use what’s in the template. My first template didn’t include a List Bullet style. The agent hit an error, switched to the default paragraph style for bullets, and still produced a document with bullet points. A template with a full set of styles avoids that detour.
What do you need to set up in the agent?
This works in Agent Builder in Microsoft 365 Copilot, which was called Copilot Studio lite for a while. You need three things in the agent’s configuration:
- The template as knowledge. Upload your branded Word document under knowledge. It shows under Uploaded files once it’s finished uploading.
- Code interpreter on. In the Capabilities section, turn on Create documents, charts, and code. Without it, the agent can only write text in the chat.
- Instructions that name the file. Add a section on Word document creation that gives the template’s exact file name.
In one of my agents, the instructions say: “If a user asks to create a Word document, you must create the document using the template Daniel Anderson Document Template that has been added to your knowledge.” Then, in the output style section, I repeat it: every Word document that gets created must always use that template. I wrote the instructions in markdown, with a heading for each section.
How the agent builds a proposal on your letterhead
I came across this during an agent enablement session, with a proposal and scoping agent. Its only knowledge file was the letterhead, a branded Word document with nothing in it but the header and logo. The instructions set out the proposal structure: an executive summary as a Heading 1, then numbered sections, each as a Heading 2.
From a set of meeting notes, the agent drafted the proposal in the chat, and once the draft was right it wrote Python to build the Word file. It worked around the missing bullet style on its own. In Word, the logo and header were there, the executive summary was a Heading 1 and every section heading was a Heading 2, exactly as the instructions set out.
Instructions change the document as well as the draft. One added line asking for a sign-off and acceptance table (full name, title and signature for the client and for me) put the table in both on the next run. It came out plain, because my template has no table styles yet.
Does it work with agents grounded on SharePoint?
Yes. My project summary agent is grounded in a project site’s libraries: site reports, status updates and the other documents collected for the project. Its summary of the latest update came with sources and citations, and the Word version it built from that summary had my footer and the template’s styles.
With the Word document creation section in its instructions, the same agent raised the option itself. After a summary of site progress up to week eight, it offered to generate a client-ready summary document using the project template if I said “create a word version”. It found the template in its knowledge and produced a document with the letterhead, headings and footer.
What I’d sort out before giving this agent to a team
-
Build the template properly first. Add List Bullet, List Number, the heading levels you want and a table style before you upload it. Both glitches in my demos, the bullet error and the plain table, came from my template.
-
Use the exact file name, and say it twice. Put it in a Word document creation section and again in the output style rules. If you rename the template, update the instructions in the same sitting.
-
Generate the document last. Iterate on the content in the chat, where changes are quick, and only ask for the Word file once the draft is right. Each document request runs the code again.
-
Upload a clean template, never a finished document. People you share the agent with can get responses grounded in its uploaded files. A past proposal for a real client has no place in there. The uploaded content also takes the highest-priority sensitivity label of its files, and anyone without extract rights for that label can’t use the agent.
-
Give each document type a home. One template per agent works well. If one agent needs to produce proposals, status reports and steering briefs on different templates, package each one as a skill with its own template. I cover that approach in how to add skills to Copilot agents in Agent Builder.
Frequently asked questions
Do I need Copilot Studio to make an agent create Word documents? No. Agent Builder in Microsoft 365 Copilot is enough. The Create documents, charts, and code toggle is in the Capabilities section of the agent’s Configure tab, and uploaded files appear under Uploaded files on the same tab.
What file types can I upload as agent knowledge? Agent Builder accepts .doc, .docx, .pdf, .ppt, .pptx and .txt files up to 512 MB, and .xls and .xlsx up to 30 MB, with up to 20 uploaded files per agent. Uploaded files can take a few minutes to finish processing and show grey until they’re ready.
Can people I share the agent with see the template? They can get responses grounded in any file uploaded to the agent, so treat uploaded knowledge as shared. Files with password protection, Double Key Encryption or user-defined permissions can’t be used as knowledge.
Where does the finished Word document go? In my demos the agent returned the document as a file in the chat that I could open in Word or download. From there you save it wherever it belongs, such as the project’s SharePoint library.