Java Barcode Generator, .NET Barcode Generator for C#, ASP.NET, VB.NET
HOME PURCHASE SITEMAP COMPANY

Home > .NET Barcode > Barcode Generation Guide > Word Barcode Generation Guide in C#

Download .NET Barcode Generator Trial

How to Generate Barcode in Word using C#





Quick Navigate



1. Prerequisites
  • BarcodeLib.Barcode.ASP.NET.dll / BarcodeLib.Barcode.WinForms.dll
  • Microsoft .NET Framework 2.0 (or later)
  • Visual Studio .NET 2005 or above
  • Microsoft Office Word 2007 or above


2. How to install .NET Barcode Generator?
To install .NET barcode generator for your barcode project, you only need to add the barcode library to project reference.
  1. Create your barcoding project in Microsoft Visual Studio
  2. Click "Project" and select "Add Reference..."
  3. In the pop-up window, click "Browse" to add "BarcodeLib.Barcode.WinForms.dll" or "BarcodeLib.Barcode.ASP.NET.dll" to reference


3. How to Generate Barcodes in Word using C#
  1. Open your Visual Studio, and create a new Visual C# project "Word Document"
  2. Now drag a PictureBox from the Toolbox and drop it in the Word document
  3. Double click picturebox for Visual C# programming
  4. Copy the Visual C# .NET sample code to your project
  5. Debug and a barcode is printed in the Microsoft Word document
         private void pictureBox1_Click(object sender, EventArgs e)
         {
         BarcodeLib.Barcode.Linear barcode = new BarcodeLib.Barcode.Linear();

         barcode.Type = BarcodeType.CODE39;
         barcode.Data = "CODE39";
         barcode.DPI = 72;
         barcode.UOM = BarcodeLib.Barcode.UnitOfMeasure.PIXEL;
         barcode.Rotate = RotateOrientation.BottomFacingDown;

         barcode.BarWidth = 3; 
         barcode.BarHeight = 80;
         barcode.LeftMargin = 3;
         barcode.RightMargin = 3;
         barcode.TopMargin = 3;
         barcode.BottomMargin = 3;

         Bitmap bmp = barcode.drawBarcode();
         this.pictureBox1.Image = bmp;



Other Related .NET Barcode Generator SDKs



   Copyright © 2013 BarcodeLib.com. Provides High Quality .NET Barcode, Barcode .NET, .NET Barcode Generator, Barcode Generation for .NET, C# Barcode, ASP.NET Barcode, VB.NET Barcode Components. All rights reserved.