Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-12-2013, 09:47 PM
tinfanide tinfanide is offline Range.Collapse? Windows 7 64bit Range.Collapse? Office 2010 32bit
Expert
Range.Collapse?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default Range.Collapse?



Code:
Sub FindUntiltheEndofDocument()

Dim oRange As Range
Set oRange = ThisDocument.Range(0, 0)
With oRange.Find
    .ClearFormatting
    .MatchCase = False
    .Text = "cat"
    While .Execute
        oRange.Select
'' Why is it needed?
        oRange.Collapse Direction:=wdCollapseEnd
    Wend
Set oRange = Nothing
End With

End Sub
Even without the line,
Code:
        oRange.Collapse Direction:=wdCollapseEnd
it is still the same in effect as with this line of codes.

Why is the range needed to be collapsed to the end then?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Expand/Collapse default settings not retained PatP Outlook 8 07-25-2013 11:44 PM
Expand/Collapse in Html Word File kitkat0910 Word 0 10-10-2012 03:42 AM
multiple text boxes collapse on move apricoti Word 2 01-26-2012 05:55 PM
Range.Collapse? Drop-Down Menu, show-hide, expand-collapse??? 300zxmuro Word 1 02-27-2011 03:02 PM
Range.Collapse? Expand & Collapse Folders in "Unread Mail" WoodstockCEO Outlook 3 02-14-2010 09:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:04 AM.


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