Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Insert Line Break (Word 2002)

    I need to insert what Word calls a "manual line break" into a document from VBA. Not the vbCrLf, nor vbCr, nor vbLF - but the thing you get when you press Shift-Enter. I need to insert a number of them into a text string, so I was naively hoping there was a simple Chr() value. Can anyone help, please?
    Thanks
    Mike G

  2. #2
    New Lounger
    Join Date
    Jan 2001
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert Line Break (Word 2002)

    Had a brainstorm - recorded a macro, pressed Shift-Enter, opened the macro and discovered Chr(11). That did it.
    Mike G

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert Line Break (Word 2002)

    Hi Mike,

    It's Chr(11). You could also use vbVerticalTab; but this would be confusing, because it's not really a vertical tab ... These constants come from VBA/ASCII, not from Word, which defines some of the ASCII control characters differently.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Regards, Klaus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •