Page 1 of 1

WDTextboxAppendToFile and line feed

PostPosted: Tue Oct 03, 2017 4:19 pm
by baur
i would like to send my textbox info to my fichier.txt but i can't have a line feed.
How to make that ?
thank .

Re: WDTextboxAppendToFile and line feed

PostPosted: Tue Oct 03, 2017 9:51 pm
by Justyn Roy
Hi Baur,

I was working on a project that required the same thing today.

It does make a new line, it just doesn't show up in Windows Notepad.

If you open it with Windows Wordpad it works a little better, but is still not perfect with this script.
If you use a different script, it will work a little better though:

Get the information from the TextBox into a Variable:
Create a String Variable called "Textbox"

Code: Select all

Now send this to the file with the following code:

Code: Select all
WDVariableAppendLineToFile,Textbox,PATH TO TEXT FILE.txt

I was able to read this with new lines in Word Pad, but not Note Pad.

Also, your original script will work with Notepad ++ for reference - a free tool that has a lot of additional options compared to the default Windows tools.



Re: WDTextboxAppendToFile and line feed

PostPosted: Wed Oct 04, 2017 2:55 pm
by Benni_M

Exatly like Justyn wrote but you have to add a label for a new line.

Create Label 1

Code: Select all
label1.text = \n
Textbox = textbox1.text

this should work.

Best regards,