Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm using the sharepoint bar code generation feature and I was wondering if someone knows which field does it uses to generate the bar code pattern/image, or does it generates that "unique string" on execution time? Thanks

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Take a look at the BarcodeGenerator Class members. There is a GetBarcodeImage and GetBarcodeValueAndImage. According to the class documentation: "This member is reserved for internal use and is not intended to be used directly from your code." You can call the BarcodeGenerator constructor to create a new instance. Other than that, the majority of the members and properties of the BarcodeGenerator class are reserved for internal use and not for direct use in your code.

There is a ECM starter kit, that has a sample barcode generator. This is MOSS 2007 version. But, it might give you some insight into how the barcode is generated.

This tutorial will help you as well.

The barcode feature has been removed in SP 2013 (beta 2) and most likely in the final release. If you plan to implement this feature in SP 2010, be warned that once you upgrade to SP 2013 your feature using barcode will not work. The reason this feature was dropped in SP 2013 is because of low adoption. For a list of features discontinued in SP 2013, see: this page.

share|improve this answer
    
"Insert Barcode command is no longer available on the ribbon. The functionality of requiring SharePoint generated barcodes to be embedded in a Microsoft Word document has been discontinued." Workaround: "Write a custom Open XML application that takes the server side barcode and injects into the Word document." According to this the barcode information policy will still work, but the barcode insertion into office documents won't work. Thats ok since I have a custom office template - fields combine functionality (and I think I can insert the image on the office template combination). –  Jaime Sep 11 '12 at 18:09
    
Then you are fine. Use the BarcodeGenerator class. –  Hossein Aarabi Sep 11 '12 at 18:23
    
Still I was wondering if you (or anybody else) knows how the out string used for the barcode generation is built/generated. I have a custom Document Id provider functionality working and it keeps giving me random strings (the barcode, not the doc id generator, that works awesomely fine!) and I need the barcode to be generated according to my custom doc id, not that random string. Anyways I think the only workaround is to write another custom provider for the barcode generation –  Jaime Sep 11 '12 at 18:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.