Import & Export
Import and export Word documents to and from text, Markdown, and HTML formats
Importing Content
From Plain Text
text = "Line one\n\nLine two\n\nLine three"
// Via BIF argument
word( text=text ).save( "from-text.docx" )
// Via instance method (appends to existing document)
word( "template.docx" )
.fromText( text )
.save( "appended.docx" )From Markdown
markdown = "
## Introduction
This is a paragraph with **bold** and *italic* text.
- Item 1
- Item 2
- Item 3
> A blockquote
`inline code`
"
// Via BIF argument
word( markdown=markdown ).save( "from-markdown.docx" )
// Via instance method
word().fromMarkdown( markdown ).save( "from-markdown.docx" )From HTML
Supported HTML Elements
HTML Element
Word Output
Exporting Content
To Plain Text
To Markdown
To HTML
Format Conversion Pipeline
Fidelity Notes
Direction
Preserved
Lost
π Related Resources
User GuideFormattingFluent APILast updated
Was this helpful?
