Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Sep 2007
    Posts
    54
    Thanks
    7
    Thanked 1 Time in 1 Post

    Word 2010: Multiline Userform in VBA not working

    Hi -- I'm really hoping someone can help me. I have a letterhead macro that I created for our office back in Word 97, and its worked fine all this time except now that we are upgrading to Word 2010, it is caving on a "makeonepar" code.

    strAttn = MakeOnePar(txtAttn)

    I have a multiline textbox for the user to enter more than one attention person and more than one line on the RE line while maintaining the hanging indent, so it was basically using a soft return. There isn't always more than one attention person or more than one line on the re line.

    Can someone please point me in the right direction?

    Thanks so much.

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    MakeOnePar is not a built in command (AFAIK) so I'm guessing it is a function that should be in the code somewhere. Based on what you describe, it could be as simple as...

    Function MakeOnePar(str As String) As String
    MakeOnePar = Replace(str, Chr(13), Chr(11))
    End Function
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. The Following User Says Thank You to Andrew Lockton For This Useful Post:

    maverik (2012-02-23)

  4. #3
    Star Lounger
    Join Date
    Sep 2007
    Posts
    54
    Thanks
    7
    Thanked 1 Time in 1 Post
    You were totally right. I missed that function when I was searching!

    Michelle

Posting Permissions

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