473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

asp.net & word problem

I have some code that inputs text into a word template but I cant figure out
how to input a line break. I have:

cell.Range.Text = "Jesse Johnson";
I NEED TO A LINE BREAK HERE
cell.Range.Text = "Address";
I NEED TO A LINE BREAK HERE
cell.Range.Text = "City, State Zip";

I want it to read:

Jesse Johnson
Address
City, State Zip

Cant figure this out. Any ideas?

--
Jesse Johnson
Apr 10 '06 #1
2 824
Nevermind, I answered my own question. For everyone its just a simple \n

like this: string = "Name" + '\n' + "Address"

pretty simple.

--
Jesse Johnson
"Jesse Johnson" wrote:
I have some code that inputs text into a word template but I cant figure out
how to input a line break. I have:

cell.Range.Text = "Jesse Johnson";
I NEED TO A LINE BREAK HERE
cell.Range.Text = "Address";
I NEED TO A LINE BREAK HERE
cell.Range.Text = "City, State Zip";

I want it to read:

Jesse Johnson
Address
City, State Zip

Cant figure this out. Any ideas?

--
Jesse Johnson

Apr 10 '06 #2
FYI I'd favour the use of Environment.NewLine rather than \n
"The property value is a constant customized specifically for the
current platform"

Apr 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris J | last post by:
Hi all, ] I'm having a problem with Word 2002 when downloading a Word document with IE6. This is in an intranet application, and the download occurs through an ASP that does security checks...
27
by: Daniel Vallstrom | last post by:
I'm having problems with inconsistent floating point behavior resulting in e.g. assert( x > 0.0 && putchar('\n') && x == 0.0 ); holding. (Actually, my problem is the dual one where I get...
1
by: aegis | last post by:
Exercise 1-22. Write a program to ``fold'' long input lines into two or more shorter lines after the last non-blank character that occurs before the n-th column of input. Make sure your program...
4
by: Lewis Edward Moten III | last post by:
I have a file that users can download through a web page protected by forms authentication: Download.aspx?ID=45 and within that file ... FileInfo fileToDownload = new FileInfo(fileName);
5
by: arnuld | last post by:
On Mon, 05 May 2008 18:55:44 -0700, Barry Schwarz wrote: ok, I changed the name to string_copy yes, I could have used array-indexing too but I am quite weak at
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.