---
title: "Insert Image into a Word document"
---


{{% alert color="grey" %}}

## Purpose Summary

This page describes how to insert a picture into a Word document.

{{% /alert %}}

On this page we will look at how to insert images into a Word document using Aspose.Words or Open XML SDK.

{{< nosnippet >}}

{{< tabs tabTotal="2" tabID="1" tabName1="Aspose.Words" tabName2="Open XML SDK" >}}

{{< tab tabNum="1" >}}

[DocumentBuilder](https://reference.aspose.com/words/net/aspose.words/documentbuilder/) is a powerful class that is associated with a [Document](https://reference.aspose.com/words/net/aspose.words/document/) and allows to build a dynamic document from scratch or  add new elements to an existing document. It provides methods to insert text, paragraphs, lists, tables, images, and other contents, as well as specification of font, paragraph, section formatting, and other things.

The `DocumentBuilder` complements classes and methods available in the Aspose.Words Document Object Model (DOM) to simplify the most common document building tasks such as inserting text, tables, fields, and hyperlinks.

The following code example shows how to insert an image into a document at a specified position and size:

{{< gist "aspose-words-gists" "afebd31ce5f43b5ee063000243681bd2" "insert-image-aspose-words.cs" >}}

{{< /tab >}}

{{< tab tabNum="2" >}}

You can also do the same using the Open XML SDK. At the same time, note that it looks somewhat more complicated and more cumbersome.

The following code example shows how to insert image into a body part of a Word document.

{{< gist "aspose-words-gists" "afebd31ce5f43b5ee063000243681bd2" "insert-image-open-xml.cs" >}}

{{< /tab >}}

{{< /tabs >}}

{{< /nosnippet >}}

{{% alert color="primary" %}}

You can download the sample file of this example from [Aspose.Words GitHub](https://github.com/aspose-words/Aspose.Words-for-.NET/tree/master/Plugins/Aspose.Words%20Vs%20OpenXML%20Words/Aspose.Words%20VS%20OpenXML).

{{% /alert %}}

{{% alert color="primary" %}}

For more information about Aspose.Words features please visit [Working with Images](/words/net/working-with-images/).

{{% /alert %}}
