Skip to main content

Search

Search

Ver 10 Multiple Templates In Document

Comments

5 comments

  • Avatar
    Shotaro Ito
    Hi gck,
    You can list name of templates in a document, by Format.UsedNames() command via ActiveX, when you control BarTender from VB.net.

    [code]
    'Declare a BarTender application variable'

    Dim btApp As BarTender.Application

    'Declare a BarTender document variable

    Dim btFormat As New BarTender.Format

    'Create a new instance of BarTender

    btApp = new BarTender.Application

    'Set the BarTender application visible '

    btApp.Visible = True

    'Open a BarTender document '

    btFormat = btApp.Formats.Open("c:\Format1.btw", False, "")

    'Show a list of template names on the template(s)'

    MessageBox.Show(btFormat.UsedNames(BarTender.BtNameType.btUsedTemplateFields), ":")

    'End the BarTender process '

    btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)

    [/code]

    Or do you mean, VB Script in BarTender document?
    0
  • Avatar
    Legacy Poster
    Controlling Bartender through Print SDK and VB.Net
    0
  • Avatar
    Shotaro Ito
    Ok, hope the above helps. unfortunately I couldn't find how to specify / enable template from ActiveX, you need to use Template Selector or Enable when True condition, of BarTender's page setup > Template.
    0
  • Avatar
    Legacy Poster
    I am trying just to get the label template names from the document since that is a field in my database. I am using .NET Print SDK to open the documents. It looks like the SDK doesn't have properties to get to template names. By the above code will I have to use ActiveX to get to the label template property?
    0
  • Avatar
    Shotaro Ito
    You right, Template names are not aviailable from .net SDK at the moment.
    0

Please sign in to leave a comment.