Community discussion forum

How can i send data from VB.Net to Dymo Labels

  • 6 months ago

    For one project we need to integrate the application output of project with the labels of the dymo printer. Actually we have to send some data(text,numeric,mix) to the labels of the DYMO LABELWRITER DUO Label printer. The labels we need to send data is 1. Shipping(99014) 2. Tape Label with 12 mm width.

    I have downloaded the the sdk from dymo company site, but i am not getting any specific help which meet our requirement. I am sending the code snippet which i am using.

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Code Snippe '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Dim DymoAddIn As Object Dim DymoLabels As Object Dim sAddress As String, sCRLF As String sCRLF = Chr(13) & Chr(10)

        DymoAddIn = CreateObject("Dymo.DymoAddIn")
        DymoLabels = CreateObject("Dymo.DymoLabels")
        Dim p As New System.Diagnostics.Process
        p.StartInfo.FileName = "C:\Program Files\DYMO Label\dymolbl.exe"
        p.Start()
        DymoAddIn.Open("C:\Documents and Settings\All Users\Documents\DYMO Label\Label Files\Himanshu_Label.LWL")
        sAddress = "Himanshu" & sCRLF & "properly" & sCRLF & "Conveniently located in..." & sCRLF & "India"
        DymoLabels.SetAddress(0, sAddress)
       Me.Refresh()
    

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    I am using the VB.Net as programming language. With this code i am able to open the dymo printer with the pre specified dymo label. But i am not been able to send the data to this pre specified label.

    Post was edited on 27/05/2009 10:17:17 Report abuse
  • 4 months ago

    Call the following function as follows

    printlabels("Information to " & chr(10) & "Print on Label",3)

    this will print 3 labels as:

    Information To Print on Label

    The dymo software will fit it onto the label.
    You can use the Mylabel.SetField("FieldName","String to put on field") and add multiple fields.

    Public Shared Sub printlabels(ByVal labeltext As String, ByVal labnum As Integer) Dim myDymo As Object = CreateObject("Dymo.Dymoaddin") Dim myLabel As Object = CreateObject("Dymo.Dymolabels") myDymo.Open(CStr("Path_to\File Folder Label.LWT") myLabel.SetField("Address", labeltext) myDymo.Print(labnum, True) End Sub

  • 4 months ago

    Damn thing mangled my code.

    Public Shared Sub printlabels(ByVal labeltext As String, ByVal labnum As Integer)

    Dim myDymo As Object = CreateObject("Dymo.Dymoaddin")

    Dim myLabel As Object = CreateObject("Dymo.Dymolabels")

    myDymo.Open(CStr("Path_to\File Folder Label.LWT")

    myLabel.SetField("Address", labeltext)

    myDymo.Print(labnum, True)

    End Sub

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!