+ Reply to Thread
Results 1 to 4 of 4

A Selectionm method will generate a new line AND preserve indentation location?

  1. #1
    Registered User
    Join Date
    12-20-2014
    Location
    North America
    MS-Off Ver
    2013
    Posts
    40

    A Selectionm method will generate a new line AND preserve indentation location?

    This image best shows what I'm trying to accomplish:
    https://i.imgur.com/BDFmVr6.png

    I have also attached the image.

    When I press the enter on the keyboard, MS Word uses the indentation location, of the last line, which is the desired outcome.

    Please Login or Register  to view this content.
    Attached Images Attached Images

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: A Selectionm method will generate a new line AND preserve indentation location?

    VBA doesn't work that way. Not everything you can do via the GUI is built into VBA. In this case, though, you can achieve the same result via:
    Please Login or Register  to view this content.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    12-20-2014
    Location
    North America
    MS-Off Ver
    2013
    Posts
    40

    Re: A Selectionm method will generate a new line AND preserve indentation location?

    Thank you.

    I had to include an If statement, to not allow it to run on the final iteration.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: A Selectionm method will generate a new line AND preserve indentation location?

    It would be somewhat simpler to use:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Generate Random Text, but to preserve the matching Column A & Column B
    By Andy8 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-28-2016, 03:24 AM
  2. Hit Tab button to insert new line and preserve previous lines formulas
    By eighch in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-25-2014, 09:14 PM
  3. Method to quick jump to decide location
    By choy96 in forum Excel General
    Replies: 1
    Last Post: 10-26-2010, 11:03 AM
  4. Location method with ActiveSheet
    By pierre_colin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2010, 07:51 AM
  5. method 'location' of object '_Chart' failed.
    By Hendel in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-29-2008, 01:03 PM
  6. Find Method & Cell Location
    By jazzjava in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2005, 01:17 PM
  7. [SOLVED] Chart location method fails using sheet name
    By deko in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2005, 11:06 AM

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