Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2016, 09:38 AM
rocky2 rocky2 is offline Is there a way to select an entire list? Windows 10 Is there a way to select an entire list? Office 2013
Novice
Is there a way to select an entire list?
 
Join Date: Feb 2016
Posts: 25
rocky2 is on a distinguished road
Default Is there a way to select an entire list?


Hi,

Is there a way to select an entire list?
I tried to see the number of items in a list but couldn't see that either.
Perhaps because I also have lines that are indented but without numbers? So of a list continue.

(The goal is to put a keep with next in the item before the last.)

Thanks,
Rocky
Reply With Quote
  #2  
Old 03-07-2016, 01:58 PM
macropod's Avatar
macropod macropod is offline Is there a way to select an entire list? Windows 7 64bit Is there a way to select an entire list? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

While it's possible, doing so depends on the list being formatted in a predictable way (e.g. via the use of a predefined Style), so the macro can determine where it starts/ends. Things start getting complicated, too, if the list has sub-lists...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-07-2016, 10:19 PM
Guessed's Avatar
Guessed Guessed is offline Is there a way to select an entire list? Windows 10 Is there a way to select an entire list? Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,980
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

This seems to work for multiple levels of an outline list
Selection.Range.ListFormat.List.Range.Select

If you have restarted lists then the selection stays within the one block but if the numbering continues from a previous block then you end up selecting both blocks plus the bit in between.

So the macro to add a keep with next to the second last paragraph would be
Code:
Sub Mac2()
  Dim aRng As Range
  Set aRng = Selection.Range.ListFormat.List.Range
  If aRng.Paragraphs.Count > 1 Then
    aRng.Paragraphs(aRng.Paragraphs.Count - 1).KeepWithNext = True
  End If
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #4  
Old 03-08-2016, 02:07 AM
rocky2 rocky2 is offline Is there a way to select an entire list? Windows 10 Is there a way to select an entire list? Office 2013
Novice
Is there a way to select an entire list?
 
Join Date: Feb 2016
Posts: 25
rocky2 is on a distinguished road
Default

Thank you.
Reply With Quote
Reply

Tags
list, list number



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to select an entire list? Select an entire line (to insert one) Officer_Bierschnitt Excel Programming 3 11-06-2015 03:05 AM
Is there a way to select an entire list? How to select and copy to clipboard an entire document except for a paragraph and keep formatting TD_123 Word VBA 7 06-16-2015 03:30 PM
Is there a way to select an entire list? Can I select the entire second or third level in an org. chart? blockie Word 1 08-25-2014 11:19 PM
Build a document from a set of standard paragraphs by using a tick list to select tho pete knight Word 9 11-13-2013 02:05 AM
Return Entire Row ibrahimaa Excel 3 01-10-2012 05:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft