Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #22  
Old 07-13-2018, 08:02 PM
macropod's Avatar
macropod macropod is offline Splitting word doc into batches of 1000 words Windows 7 64bit Splitting word doc into batches of 1000 words Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,374
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

And, for my part:
Code:
Sub Segmenter()
Application.ScreenUpdating = False
Dim i As Long, j As Long, Rng As Range
With ActiveDocument
  Set Rng = .Range(0, 0): j = 1000
  For i = 1 To -Int(-.ComputeStatistics(wdStatisticWords) / j)
    If .Range(Rng.Start, .Range.End).ComputeStatistics(wdStatisticWords) < j Then Exit For
    With Rng
      .MoveEnd wdWord, j
      .End = .Paragraphs.Last.Range.End
      If .End = DocSrc.Range.End Then Exit For
      .InsertAfter vbCr
      .Collapse wdCollapseEnd
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find (highlight) two and more words in a list of 75k single words in Word 2010 Usora Word 8 05-29-2018 03:34 AM
Splitting word doc into batches of 1000 words Problem with words splitting into 2 lines sharkrfish Word 2 05-21-2015 04:47 PM
Redirect mail in batches in Office for MAC 2011 mervalong Outlook 0 11-08-2011 12:17 AM
Splitting word doc into batches of 1000 words Help Splitting and images in word 2007. aligahk06 Drawing and Graphics 1 10-08-2009 12:58 AM
Splitting word doc into batches of 1000 words WORD 2003 Need help splitting a HUGE Document dlawson Word 4 04-14-2009 12:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:02 PM.


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