IRONSOFTWAREHOME
Create DOCX From Text
using IronWord;
using IronWord.Models;

// Create textrun
TextContent textRun = new TextContent("Sample text");

Paragraph paragraph = new Paragraph();
paragraph.AddChild(textRun);

// Create a new Word document
WordDocument doc = new WordDocument(paragraph);

// Export docx
doc.SaveAs("document.docx");
Imports IronWord
Imports IronWord.Models

' Create textrun
Dim textRun As New TextContent("Sample text")

Dim paragraph As New Paragraph()
paragraph.AddChild(textRun)

' Create a new Word document
Dim doc As New WordDocument(paragraph)

' Export docx
doc.SaveAs("document.docx")
NuGet Download
PM > Install-Package IronWord
Create DOCX From Text

Create DOCX From Text

Creating a new Word document from text is also simple. Pass any document structure object, such as a paragraph, table, or section, to instantiate a new Word document. Finally, use the SaveAs method to export the document.

Explore Our Document Element Tutorial for IronWord
View on GitHub

Ready to Get Started?

Nuget Downloads 58,016Version:2026.10just released

Key in blue circle

Get your free 30-day Trial Key instantly

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronWord
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get a Quote, No Obligation
Your details will always be kept confidential.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Trusted by Millions of Engineers Worldwide
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.10

PM > Install-Package IronWord
nuget.org/packages/IronWord/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronWord"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.10

  1. Download and unzip IronWord to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronWord.dll"

Licenses from $999