Ver 10 Multiple Templates In Document S’abonner
In Version 10 you can have multiple templates in a document. Is there a way to get the names of those templates through VB?
5 commentaires
0

Shotaro Ito
★ BarTender Hero ★
Actions pour les commentaires
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?
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?
Controlling Bartender through Print SDK and VB.Net
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.
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?
You right, Template names are not aviailable from .net SDK at the moment.
Vous devez vous connecter pour laisser un commentaire.