How To Check If Text Overflows In Text Paragraph?
Hi,
I have a textbox paragraph type data-source using excel. How can I display a warning during print time when the text overflows outside the border?
I am thinking of calculating the height of the textbox during print and it if it is over a certain height display warning message, can someone please help me with the code to do this.
Thank you
-
Hello Sai,
In order to evaluate the height of an object, you'll need to use a document level VB Script (Automation edition or higher is required) accessible from the "File>BarTender Document Options..." item under the "VB Script" tab.
From there you could add a code similar to the below to the "OnNewRecord" event, so it runs for each one of your records.
If Format.Objects(«object name or index»).Height ThenFormat.CancelPrinting("Data overflows text object")End IfThe Format.CancelPrinting() function will prompt a message asking you if you wish to continue or cancel the print job.
Regards.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar