Passing Cr Lf With Commander Files フォローする
Hi, I'm currently running Bartender 10.0 Enterprise Automation. I have my environment configured so that .txt files are wrote to a network drive and the labels are automatically printed at whatever location. I am passing a comma delimited file as the data for the print. In my one field, I now need to pass a multi-line paragraph with carriage returns. I know that my comma delimited file can not have real carriage returns in it, so is it possible to pass a special character so that my Bartender template knows where to break return? I tried <<CR>> and <<LF>> without success.
1 コメント
You can't pass CR character in a commander text file, because commander treats it as end-of-data for a label.
But I solved this problem by inserting the characters '<CR>' (not the carriage return character [Chr(13)]) into my data.
Then I added the following one line VB script to the OnProcessData event of the recieving object in the btw Format file:
Value = Replace(Value, "<CR>", VbCrLf + VbCrLf)
This causes all occurances of the characters <CR> to be replace by a double set of carriage return + Linefeed.
I used 2 VbCrLf constants because I wanted a blank line between paragraphs, but one VbCrLf constant will work for a new line w/o a blank line.
You can get to the VB scripting area in the format file by opening the object properties > data source tab > More Options button > VB Scripting tab.
サインインしてコメントを残してください。