C++ Word Files Processing API

Generate and manipulate Word document formats from within any C++ application without requiring Microsoft Word.

  Download Free Trial
Aspose.Words for C++

Aspose.Words for C++


Aspose.Words for C++ is an advanced Word Document Processing API to perform a wide range of document processing tasks. API provides document formatting, manipulation, mail merge, watermarking and much more capabilities directly within your own C++ applications without requiring Microsoft Word. API supports most of the Microsoft Word formats for processing.


Advanced C++ Word Document Processing API Features



Join & split documents on the fly


Manipulate built-in & custom properties


Enumerate over document content


Preserve OLE objects and ActiveX controls


Manipulate fonts, colors, effects, borders & shading


Manipulate indents, spacing, borders, shading, tab stops


Manipulate bulleted and numbered lists


Manipulate paper size, margins & orientation


Find, replace & highlight text


Mail Merge support


Update fields except page layout to porting


Convert EquationXML to Office Math

Programming with Document Object Model

API enables C++ applications to automate Microsoft Word document creation as well as open and modify files including document formatting with an intuitive document object model that mimics Microsoft Word in terminology & features. C++ developers can dynamically create, modify, extract and replace all document elements including sections, paragraphs, tables, bookmarks, fields, form fields, comments, images, styles and so on. 

Join or Append Documents

Aspose.Words for C++ supports joining & appending multiple documents into one. This process is very simple as well as configurable, providing the means to control how the documents are joined. C++ Word Processing Library also allows to reset the page numbering after joining the documents.

Join 2 documents - C++

// load source & destination documents
System::SharedPtr dstDoc = System::MakeObject(dir + u"destination.doc");
System::SharedPtr srcDoc = System::MakeObject(dir + u"source.doc");
// set the appended document to start on a new page.
// append the source document using the original styles found in the source document.
dstDoc->AppendDocument(srcDoc, Aspose::Words::ImportFormatMode::KeepSourceFormatting);
// save result
dstDoc->Save(dir + u"output.doc);

Add Watermark to Documents

Aspose.Words for C++ provides extensive support for watermarks. While using Aspose.Words for C++, it is very easy to insert any shape, image or text as a watermark with the ability to format it in any way. This provides the ability to create watermark of any imaginable type.

Easy to Use Security Options

Aspose.Words for C++ offers the facility to protect & un-protect documents with single line of code. You may set the protection in a way that the user can make only limited changes, such as adding annotations, making revisions or completing a form.

Protect/un-protect documents - C++

// load document to be processed
System::SharedPtr document = System::MakeObject(dir + u"template.doc");
// protect document 
document->Protect(Aspose::Words::ProtectionType::AllowOnlyFormFields, u"password");
// un-protect document

Support and Learning Resources


Aspose.Words offers individual Word processing APIs for other popular development environments as listed below: