Skip to main content

Search

Search

Change Fields(Text) From A Template Label

Comments

2 comments

  • Avatar
    Fernando Ramos Miracle

    Hello Luis,

     

    Indeed this can be done.

     

    The easiest way of doing so is through the "SubString.Value" property. Below you'll find a sample of how this is done:

     

     

    Engine btEngine = new Engine();
    LabelFormatDocument btFormat = btEngine.Documents.Open(@"c:\MyLabel.btw");
    btFormat.SubStrings["Address"].Value = "1313 Mockingbird Lane, Anywhere, USA";
    btFormat.SubStrings["Name"].Value = "John Doe";
    btFormat.SubStrings["Quantity"].Value = "10"; 
     
     

     

     

     

     

    Please note that in BarTender's Help documentation you'll find explanation on all our classes and properties with examples, apart of samples such as the one displayed above.

     

    You can find our documentation through BarTender's "Help>BarTender's Help" option.

    0
  • Avatar
    ddaniels

    I am looking for the same thing but using an Excel macro. Below is my working code to open the tag/tags but I can't pin down how to change a textbox value.

    Sub Open_Relabel_Tags()

    Dim BtApp As bartender.Application
    Dim BtFormat As bartender.Format
    Dim BtString As bartender.SubString

    Set BtApp = CreateObject("Bartender.Application")

    For i = 3 To Worksheets("Sheet1").Range("R2")
    Set BtFormat = BtApp.Formats.Open(Worksheets("Sheet1").Range("E" & i), False)
        BtApp.Visible = True

    Next
        
    End Sub

    0

Please sign in to leave a comment.