Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > asp.net & word problem

Reply
Thread Tools

asp.net & word problem

 
 
=?Utf-8?B?SmVzc2UgSm9obnNvbg==?=
Guest
Posts: n/a
 
      04-10-2006
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmVzc2UgSm9obnNvbg==?=
Guest
Posts: n/a
 
      04-10-2006
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

 
Reply With Quote
 
 
 
 
Jason Hales
Guest
Posts: n/a
 
      04-11-2006
FYI I'd favour the use of Environment.NewLine rather than \n
"The property value is a constant customized specifically for the
current platform"

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deployment of a WebApp that uses Word 10.0 via Interop.Word.dll object - How do I register the COM?? Luis Esteban Valencia ASP .Net 2 09-26-2008 08:26 PM
Open Word Doc in Word, not in Browser Franck ASP .Net 1 09-09-2005 07:37 AM
XML from Word -- formerly Create pdf from existing Word doc (asp.net) Sharon ASP .Net 0 07-27-2005 02:07 AM
How do I identify word<html><html>other word? Laura Perl 1 06-04-2004 11:32 PM
opening a word doc in word not browser Stephen Witter ASP .Net 0 05-18-2004 02:48 AM



Advertisments