Create Barcode in PowerPoint – a Step-by-Step Guide
An example how to create barcodes in Microsoft PowerPoint with StrokeScribe barcode generator. The example does not require any programming skills.
Setup
- Download and install the barcode generator;
- The example is compatible with all PowerPoint versions starting from Office 2007.
Manually adding a barcode
Step 1. Open a PowerPoint presentation, switch to the Insert tab on the Ribbon, click the Object button:
Step 2. Select the StrokeScribe Document in the Insert Object dialog and press OK:
Step 3. Right-click the barcode object and choose Properties from the context menu:
Step 4. Change any barcode properties you want:
The barcode properties that may interest you first:
- Alphabet - changes the barcode type;
- Text - the text to encode in the barcode;
- Rotation - the barcode rotation angle;
- TextBelow - custom human-readable label text below linear barcodes;
- CodePage - use this property when encoding non-ASCII characters in the barcode.
Inserting a barcode with VBA
An example how to use VBA to automate barcode placement in PowerPoint.
1. Press Alt-F11 to open VBA IDE.
2. Right-click in the VBA Project window and choose Insert->Module;
3. Paste the following code into the VBA editor.
Function inch(v) ' Inches to points
inch = v * 72
End Function
Sub barcode()
Set shp = ActivePresentation.Slides(1).Shapes.AddOLEObject(inch(2), inch(3), inch(1.5), inch(1.5), "STROKESCRIBE.StrokeScribeCtrl.1")
Set barcode = shp.OLEFormat.Object
barcode.Alphabet = 8 ' Data Matrix
barcode.Text = "123ABCDE" 8 ' A text to encode in the barcode
End Sub
4. Place the caret into the barcode() body and press F5 to execute the code.
5. Switch back to the PowerPoint window to check the barcode.
The code above always places the barcode on the first slide. To place a barcode on the currently active slide, modify the code as shown below:
Set shp = Application.ActiveWindow.View.Slide.Shapes.AddOLEObject(inch(2), inch(3), inch(1.5), inch(1.5), "STROKESCRIBE.StrokeScribeCtrl.1")
To turn on code auto completion and explore barcode generator's properties, add a reference to the StrokeScribe ActiveX Control and modify the code ash shown below:
Dim barcode As StrokeScribe
Set barcode = shp.OLEFormat.Object
© 2026 StrokeScribe. All rights reserved. Use of any portion of this site constitutes acceptance of our Terms of Use and Privacy Policy. The website material may not be reproduced, except with the prior written permission.