+ Reply to Thread
Results 1 to 9 of 9

Problem moving a "Soft Return" from Excel to Word

Hybrid View

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    Place
    MS-Off Ver
    Excel 2007
    Posts
    9

    Problem moving a "Soft Return" from Excel to Word

    I need a "soft return" (what happens when you hit "Shift+Enter" rather than "Enter") while exporting from Excel 2007 to Word 2007.

    I have tried all of the below:
    .Content.InsertParagraphAfter
    .Content.InsertAfter vbCr
    .Content.InsertAfter vbCrLf
    .Content.InsertAfter vbLf
    .Content.InsertAfter Chr(13)
    .Content.InsertAfter Chr(10)
    and they all insert an identical "hard return" (what you get if you hit "Enter")

    So, what is the difference between those, and how the heck do I get a "Soft return?"

    Thanks!
    Last edited by jvanroekel; 10-10-2012 at 09:28 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: This makes no sense!

    A soft return is what Word uses to wrap lines into paragraphs; they are not entered in any fashion. Shift+Enter in Word is a manual line break, the equivalent of line feed (vbLf, what you'd search for as ^l, as oppoosed to ^p for a paragraph break); it goes down a line without changing paragraph.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-28-2012
    Location
    Place
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: This makes no sense!

    Thank you for taking the time

    The big problem is that once this document is generated, it goes off to another department, and they have to have a very specific formatting. When we do this by hand, it is easy enough to use the shift+enter to get this. However, I can do it much faster if I macro it. Unfortunately that time savings is wiped out if I have to go back and correct the returns.

    I figured that inserting the vbLf or "Chr (13)" would do the trick, but they are giving an output identical to vbCrLf or "Chr (10)"

    I guess my question should have been phrased more as "what is the difference between ".Content.InsertAfter vbCr" and ".Content.InsertAfter vbCrLf" Considering that they return the exact same thing?"

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: This makes no sense!

    I'd have thought vbLf, but I've passed my level of incompetence; I've probably written three Word macros in my life. There are other guys here than can probably help, though.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: This makes no sense!

    Ah -- Vertical Tab, Chr(11)

  6. #6
    Registered User
    Join Date
    09-28-2012
    Location
    Place
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: This makes no sense!

    Well, I'll be darned.
    It worked!
    Thank you so much!

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: This makes no sense!

    All I did was record a macro ...

  8. #8
    Registered User
    Join Date
    09-28-2012
    Location
    Place
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: This makes no sense!

    D'oe!
    Usually I would have done that. But because "Shift+Enter" has a behavior in Excel that is totally alien to its behavior in Word, I assumed that it would give the wrong result. (insert old adage about "ASSume" here)
    I Guess that is why you have so many green dots under your name : )
    Thanks Again!

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,603

    Re: This makes no sense!

    I Guess that is why you have so many green dots under your name : )
    I actually suspect it's because The Great State of Texas has lots of greens to play golf?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1