Link to home
Start Free TrialLog in
Avatar of Brent387
Brent387Flag for United States of America

asked on

Limit Number of Characters per Row in .txt File

Hello,
There is a group at my company that needs to submit their documents to another company in ASCII format but for some reason this company won't let them use the program that will format all of this for them.
I was wondering if there was any way to write a script (ideally vbscript) to limit the number of characters per line in a notepad document to 98? I've been looking everywhere and I can't seem to find anything.

Thank you
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

what should happen when there are > 98 characters in the line?
wrap?  or cut?
Avatar of Brent387

ASKER

wrap
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think line 9 should be:
Set objWriteFile = objFSO.CreateTextFile(strDest,  True)
unless you are pre creating the destination file before running the script.
Line 9 was off but it was corrected.
sorry for that, copy/pasted the line and forgot to change the method name ...