0
I am using "Textwriter sw" to send to Word turning the textboxs into doc the problem I need some formatting. How do I set paragraph size, line spacing, etc... The code I’m using to send to Word is similar to the below:
String strtxt22 = textBox7.Text;
String strtxt23 = textBox8.Text;
TextWriter sw = new StreamWriter(@"c:\\Gold Business - Cadastro Funcionário.doc");
sw.WriteLine(strtxt22);
sw.WriteLine(strtxt23);
I don’t know the Word file format, but you can’t just send a text. You have to write a binary in the correct format. It is extremely complicated. You will probably prefer to use some library. If it is
.docx
it’s a little easier, just a little.– Maniero
By the above method transforms the text of the textboxs into doc I already tested here what I would like to know is how to format; paragraph size, space between lines and etc...
– Rafael
Does not transform into the format of
doc
, turns intortf
. Functioning does not mean that you are right and there is only right and wrong. " worked on my computer in the specific situation I tested" is not an option. I helped in what I could.– Maniero