Hi
On Wednesday 20 January 2016 at 7:31:18 AM, in <mid:509231638.20160120130...@eagle-mar.com>, bun...@eagle-mar.com wrote: > i prefer the length of the counter to have max 7 > digits. therefore, the number should appear as > "0000001" instead of just 1, 2 to appear as "0000002" > and so on.... You could add six Zeros to the front of your %_RefNo variable. Then define a Regular Expression (RegExp) search pattern to match exactly seven numeric characters at the end of the text being searched. Then run the RegExp search on your %_RefNo variable, and replace the stored value of %_RefNo with the result. Something like:- %_RefNo="000000%_RefNo"%- %SETPATTREGEXP="\d{7}?\z"%- %_RefNo='%REGEXPMATCH="%_RefNo"'%- These three lines would slot in before the last line of your existing code (%Subject=...). -- Best regards MFPA <mailto:2014-667rhzu3dc-lists-gro...@riseup.net> During an eruption - move away from the volcano - not towards it Using The Bat! v4.0.38 on Windows XP 5.1 Build 2600 Service Pack 3 --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ________________________________________________ Current version is 6.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html