Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Userform (Word 2002)

    I have a userform which allows the user to enter multiple lines of information in different areas. For example, the Subject Line can be multiple, use the enterkey, and wraptext. The user may need to start a new line in the subject (hence me turning on the enterkey). My problem is that when the information is placed into the document, it is becoming a new paragraph of the same style and not 'hanging' under the current one. Is there a way that I can code to tell all the information in a text box to use Manual Line Breaks when the user hits enter in that one field instead of Paragraph Breaks?

    Here's my line of code that I'm using for the Userform:

    Set oRange = ActiveDocument.Bookmarks("SubRe").Range
    oRange.InsertAfter SubReTxtbx

    Here's what is happening currently:

    RE: This is the text that they enter... when they need a new line they hit enter
    and the text goes back to the left margin of a new paragraph with the same style

    Here's what I need it to do:

    RE: This is the text that they enter... when they need a new line they hit enter
    and the text should hang under (as the style is defined); however, I need a Manaul Line Break in the line above

    Any ideas/suggestions would be greatly appreciated... thanx in advance... trish

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Userform (Word 2002)

    Use

    oRange.InsertAfter Replace(SubReTxtbx.Text, vbCrLf, Chr(11))

    Chr(11) is the manual line break.

  4. #3
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Userform (Word 2002)

    Oh Baby... I DO LOVE YOU... thanx for all your help... all the time... Hans... Have a great weekend... <img src=/S/love.gif border=0 alt=love width=15 height=15>

Posting Permissions

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