asp.net & word problem

Discussion in 'ASP .Net' started by =?Utf-8?B?SmVzc2UgSm9obnNvbg==?=, Apr 10, 2006.

  1. 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
    =?Utf-8?B?SmVzc2UgSm9obnNvbg==?=, Apr 10, 2006
    #1
    1. Advertising

  2. 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
    =?Utf-8?B?SmVzc2UgSm9obnNvbg==?=, Apr 10, 2006
    #2
    1. Advertising

  3. =?Utf-8?B?SmVzc2UgSm9obnNvbg==?=

    Jason Hales Guest

    FYI I'd favour the use of Environment.NewLine rather than \n
    "The property value is a constant customized specifically for the
    current platform"
    Jason Hales, Apr 11, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laura
    Replies:
    1
    Views:
    505
    Gunnar Hjalmarsson
    Jun 5, 2004
  2. Vijay
    Replies:
    1
    Views:
    566
    Jurjen de Groot
    Jul 8, 2003
  3. Stephen Witter

    opening a word doc in word not browser

    Stephen Witter, May 18, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    462
    Stephen Witter
    May 18, 2004
  4. Luis Esteban Valencia
    Replies:
    2
    Views:
    2,918
    sanjupillai
    Sep 26, 2008
  5. Sharon
    Replies:
    0
    Views:
    584
    Sharon
    Jul 27, 2005
Loading...

Share This Page