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

dymo labels , vb.net , .net India
  • 11 years 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.

  • 11 years 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

  • 11 years 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).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The question of whether computers can think is just like the question of whether submarines can swim.” - Edsger W. Dijkstra