I am trying to send the below code to a printer. I works, but I want to bold the labels (ie. Name ...) Any ideas how to format in a string?
writer.WriteLine(
"Name: " + rdr["uname"].ToString());writer.WriteLine("Password: " + rdr["pass"].ToString());
writer.WriteLine("User Type: " + rdr["uType"].ToString());
writer.WriteLine("Notes: ");
writer.WriteLine("\t" + rdr["notes"].ToString());
writer.WriteLine("---------------------------");
writer.WriteLine("");
Also anyone know of a good place to fine info on printing in general in c#?
BradPosted Mar 9, 2006, 8:49 AM
In the above I am pulling information from a database and populating an oldb reader, then I am adding the vars from the reader (rdr["uType"].ToString()) to a string(writer.WriteLine).
From there I am sending the string to a printer.
MonikaPosted Mar 9, 2006, 3:19 AM
I think that your problem can be solved like this(if I understood the problem) you have to add in your project a Word assembly and then you have to create a word document and then you can access all the things you can do in Word . Here is a link that will show you how to do that : http://www.c-sharpcorner.com//Code/2002/Mar/WordFromDotNet.asp and after that you can search on MSDN and you will find an example code written by them. I saw that you put after the name a value . what is that value. i mean from where do you take it? can you read my post regarding how to use data from a textbox in a word document ?
Regards,
Monika