# Add-OfficeWordBarcode

Adds a QR code or barcode to a Word paragraph. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

Aliases: WordBarcode

**Module**

`PSWriteOffice`

**Aliases**

`WordBarcode`

**Inputs**

`OfficeIMO.Word.WordParagraph`

**Outputs**

`OfficeIMO.Word.WordImage`

**Source**

[AddOfficeWordBarcodeCommand.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Word/AddOfficeWordBarcodeCommand.cs#L20) 

Adds a QR code or barcode to a Word paragraph.

## Syntax

```
Add-OfficeWordBarcode
[-AlternativeText <String>]
[-BackgroundColor <OfficeColor>]
[-Color <OfficeColor>]
[-ErrorCorrection <L|M|Q|H>]
[-Height <OfficeLength>]
[-NoHumanReadableText]
[-Paragraph <WordParagraph>]
[-PassThru]
[-QuietZone <Int32>]
[-Text] <String>
[-Type <SymbolFormat>]
[-Width <OfficeLength>]
[<CommonParameters>]
```

[#](#method-add-officewordbarcode-string-officecolor-officecolor-qrerrorcorrectionlevel-officelength-switchparameter-wordparagraph-switchparameter-int32-string-symbolformat-officelength)

Parameter set: `All Parameter Sets`

## Description

The code is an SVG picture with a PNG fallback, so Word draws it sharply and older readers still show it; OfficeIMO's PDF conversion places it at print resolution. Two-dimensional codes default to 1.25 inches wide; linear barcodes to 0.33 mm per bar module, with their text underneath. The alternative text defaults to the symbology and the encoded text.

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Charts, Barcodes, OCR and Provenance](/docs/foundations/) Guide
  
  Add ChartForgeX charts, Mermaid diagrams and CodeGlyphX barcodes to documents, recognize text with OCR engines, and verify C2PA Content Credentials.

## Examples

### Add a QR code that opens a web page.

```powershell
New-OfficeWord -Path .\Flyer.docx {
    WordParagraph 'Scan for the event agenda:'
    WordBarcode 'https://evotec.xyz/events'
}
```

### Print an order number as a Code 128 barcode.

```powershell
WordParagraph { WordText 'Order: '; WordBarcode 'ORD-2026-0042' -Type Code128 -Width 6cm }
```

## Parameters

**-AlternativeText String optional**

Accessible description; defaults to the symbology and the encoded text.

**-BackgroundColor OfficeColor optional**

Background and quiet zone color; a literal color.

**-Color OfficeColor optional**

Color of the bars or dark modules; a literal color such as Black or #1F3864.

**-ErrorCorrection QrErrorCorrectionLevel optional**

QR error correction level: L, M, Q or H.

Possible values: `L`, `M`, `Q`, `H`

**-Height OfficeLength optional**

Height of the whole symbol including human-readable text; numbers mean points.

**-NoHumanReadableText SwitchParameter optional**

Leave out the human-readable text that linear barcodes print under the bars.

**-Paragraph WordParagraph optionalpipeline: True (ByValue)**

Target paragraph; the current DSL paragraph, or a new one, is used when omitted.

**-PassThru SwitchParameter optional**

Return the native editable WordImage.

**-QuietZone Int32 optional**

Light margin around the symbol, in modules.

**-Text String requiredposition: 0**

Text, URL or other data to encode.

**-Type SymbolFormat optional**

Symbology; QR code by default. Any CodeGlyphX format, such as Code128, Ean, UpcA, DataMatrix or Pdf417.

Possible values: `QrCode`, `MicroQrCode`, `Aztec`, `Code128`, `Gs1Code128`, `Code39`, `Code93`, `Ean`, `UpcA`, `UpcE`, `Itf14`, `Itf`, `Industrial2Of5`, `Matrix2Of5`, `Iata2Of5`, `PatchCode`, `Codabar`, `Msi`, `Code11`, `Plessey`, `Telepen`, `Pharmacode`, `PharmacodeTwoTrack`, `Code32`, `Postnet`, `Planet`, `RoyalMail4State`, `AustraliaPost`, `JapanPost`, `Gs1DataBarTruncated`, `Gs1DataBarOmnidirectional`, `Gs1DataBarStacked`, `Gs1DataBarExpanded`, `Gs1DataBarExpandedStacked`, `UspsIntelligentMail`, `KixCode`, `DataMatrix`, `Pdf417`, `MicroPdf417`, `RmQrCode`, `Gs1DataBarLimited`, `Gs1DataBarStackedOmnidirectional`, `MaxiCode`, `DotCode`, `HanXin`, `Gs1Composite`, `Ean2`, `Ean5`, `TelepenNumeric`, `Coop2Of5`, `Datalogic2Of5`, `Bc412`, `FacingIdentificationMark`, `Daft`, `Flattermarken`, `ChannelCode`, `Code16K`, `Code49`, `CodablockF`, `PosiCode`, `Mailmark4State`, `D3Aqr`, `AztecRune`, `CodeOne`, `Ultracode`

**-Width OfficeLength optional**

Width of the whole symbol including its quiet zone; numbers mean points.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:7D397458F0E1CED581BFE3956CCEEB4ABC813701AB91242BB5D3BBB27C5494C9 -->
