# Barcode Image Generation in Word Processing Document Barcode Image Generation in Word Processing Document with GroupDocs.Assembly for Python via .NET: the template, the Python data and the code. {{< alert style="info" >}}The example reads the shop data described in [The Business Layer]({{< ref "assembly/python-net/developer-guide/basic-usage/working-with-a-business-case/the-business-layer.md" >}}).{{< /alert >}} ## Barcode Generation in Microsoft Word ### Template Syntax * Add a textbox to your template at the place where you want a barcode image to be inserted. * Add the following syntax: ```text <> ``` {{< alert style="success" >}}For detailed technical information about syntax, expressions and report generation by the engine, please visit: [Working with GroupDocs.Assembly Engine]({{< ref "assembly/python-net/developer-guide/basic-usage/working-with-groupdocs.assembly-engine/_index.md" >}}){{< /alert >}} ### Download Template Get the template from here. * [barcode.docx](https://docs.groupdocs.com/assembly/python-net/_sample_files/developer-guide/advanced-usage/working-with-barcode-image-generation/barcode-image-generation-in-word-processing-document/barcode.docx) ### The Code {{< tabs "example1" >}} {{< tab "Python" >}} ```python import json from groupdocs.assembly import DataSourceInfo, DocumentAssembler with open("customer.json", encoding="utf-8") as f: customer = json.load(f) assembler = DocumentAssembler() assembler.assemble_document("barcode.docx", "barcode-report.docx", DataSourceInfo(customer, "customer")) ``` {{< /tab >}} {{< tab "barcode.docx" >}} {{< tab-text >}} The following sample file is used in this example: [barcode.docx](https://docs.groupdocs.com/assembly/python-net/_sample_files/developer-guide/advanced-usage/working-with-barcode-image-generation/barcode-image-generation-in-word-processing-document/barcode.docx) {{< /tab-text >}} {{< /tab >}} {{< tab "customer.json" >}} {{< tab-text >}} The following sample file is used in this example: [customer.json](https://docs.groupdocs.com/assembly/python-net/_sample_files/developer-guide/advanced-usage/working-with-barcode-image-generation/barcode-image-generation-in-word-processing-document/customer.json) {{< /tab-text >}} {{< /tab >}} {{< tab "barcode-report.docx" >}} ```text Binary file (DOCX, 12 KB) ``` [Download full output](https://docs.groupdocs.com/assembly/python-net/_output_files/developer-guide/advanced-usage/working-with-barcode-image-generation/barcode-image-generation-in-word-processing-document/the_code/barcode-report.docx) {{< /tab >}} {{< /tabs >}}