computing
  • 0

Solved How To Use Dymo Label In My VBA

  • 0

Hi,

I need to create a macro that is related to a button which highlights the selected cells in yellow and that by printing on that same button, it prints my selection on my Dymo labelWriter 450.

Now I have my macro for the highlighting. My problem is that i want to print my selection which is for example A1,B1,C1 but i want c1 to be written uder the A1 and B1. Its for an event and i want the name of the person and its restaurant name right Under.

I dont know how to do this and its been several days I,m trying.

Can someone help me please 🙂 ?

Share

1 Answer

  1. re: “-Under control panel printers make sure your label printer is set as default printer.”

    Another option is to capture the “normal” default printer, print the labels to the Dymo device and then reset the default printer, all within the macro. No need for a manual change each time you want to print a label.

    Try replacing this section of AWTL’s fine code…

        ' Print sheet 2 to the default printer
        Sheets("Sheet2").PrintOut

    …with this:

    'Print to Dymo Label Printer and go back to the original printer when done.
      originalPrinter = Application.ActivePrinter
         Application.ActivePrinter = "*** Insert Dymo Printer Name Here ***"
         Sheets("Sheet2").PrintOut
      Application.ActivePrinter = originalPrinter
    

    To grab the system’s name for the Dymo printer, you can follow these steps once:

    1 – Set the default printer to the Dymo device
    2 – Open a new workbook
    3 – Run this code

    Sub GetDymoName()
     Range("A1") = Application.ActivePrinter
    End Sub

    4 – Copy the string from A1 and paste it in place of *** Insert Dymo Printer Name Here *** in the code above, making sure that it is between the quotes
    5 – Reset the default printer to the original default

    Click Here Before Posting Data or VBA Code —> How To Post Data or Code.

    message edited by DerbyDad03

    • 0