From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Label Printing via Excel

I have an issue with an application I'm developing.  Hopefully, you can help.

 

The application is designed to read a job number and obtain data from our database.  It then opens Excel using ActiveX, formats the sheet and adds the data to this sheet in order to create a label.  Labels are then printed via a Brother QL-700 label Printer using ActiveX.  Excel is opened in the background, and will be discarded when label is printed.

 

My current setup is to have the label printer connected via USB to the local PC.  This PC has a different default printer, so when Excel is opened, the Page Sizes available to print are pulled from this printer driver, so the label size I want to use is not available.

 

Everything works, except this will throw an error when I try to print to the label printer at the point where I try to set the paper size.

 

MarkTTHSAS_0-1614092697241.png

I've tried various different settings here - running a vi to query the paper size suggests this might have a value of <326> which is not a value available in the control.  I've also tried to get this value via Excel VBA and see <256> which does not work either.

 

I've also tried to set the label printer to be the default printer to perhaps expose different page sizes, but this does not work either.

 

How do I set this up to set the page size to a 2.44" x 3.93" label?  Note: the list of available page sizes is completely different (in Excel) when the active printer is change from a conventional (letter size) to the label printer, showing all the possible label sizes.

 

Any help will be gratefully received.

0 Kudos
Message 1 of 1
(878 Views)