Global Objects | Format | WriteToLog Function

ClosedDescription

Writes a custom string to the BarTender log file.

ClosedSyntax

Format.WriteToLog(Message)

Where Message is a string containing the text of the log entry.

ClosedRemarks

The Format.WriteToLog function enables you to add customized entries to the BarTender log file. The following example demonstrates the Format.WriteToLog function in use. The code checks the number of serialized items. If the number of serialized items is greater than 1000, BarTender will display a prompt that informs the user that there are too many print items. It will also write an entry to the print job log file.

If Format.NumberSerializedLabels > 1000 Then

Format.CancelPrinting("Too Many Labels. Job is being canceled.", "")

Format.WriteToLog("Print Job Canceled for" & Format.Filename)

End If