OK, try this then ..
You can change the number of pages in each small file where shown
Also you need to change it to save in your own path, again where shown
Sub SplitBigDoc()
Dim BigDoc As Document, NewDoc As Document
Dim SeqNo As Integer
Set BigDoc = ActiveDocument
SeqNo = 0
Application.ScreenUpdating = False
While Len(BigDoc.Content.Text) > 1
With Selection
.GoTo wdGoToPage, wdGoToAbsolute, 200 ' <=== Number of Pages here
.HomeKey wdStory, True
If Selection.Information(wdActiveEndPageNumber) <> 200 Then
BigDoc.Content.Select
.Cut
Set NewDoc = Documents.Add
With NewDoc
.Content.Paste
SeqNo = SeqNo + 1
.SaveAs "Part" & SeqNo & ".doc" ' <=== Full Path and Name here
.Close
End With
End With
Wend
Application.ScreenUpdating = True
Set NewDoc = Nothing
Set BigDoc = Nothing
End Sub
--
Enjoy,
Tony
> Yes I agree, but it's not a 1 time thing, I have to do that often so
> that why I was aking that
olemaitre@legermarketing.com - 08 Nov 2005 22:47 GMT
Tx for the help Tony but something is not working. I think that a end
if is missing somewhere. I'm trying to find where but no luck so far.
If you could check it, I will really appreciate
> OK, try this then ..
>
[quoted text clipped - 34 lines]
> > Yes I agree, but it's not a 1 time thing, I have to do that often so
> > that why I was aking that
Tony Jollans - 08 Nov 2005 23:34 GMT
It wasn't actually missing an EndIf - it was just the way the text got split
in the posting. But I have now broken the line and added an end if and this
shouldn't get split anymore.
Sub SplitBigDoc()
Dim BigDoc As Document, NewDoc As Document
Dim SeqNo As Integer
Set BigDoc = ActiveDocument
SeqNo = 0
Application.ScreenUpdating = False
While Len(BigDoc.Content.Text) > 1
With Selection
.GoTo wdGoToPage, wdGoToAbsolute, 200 ' <=== Number of Pages here
.HomeKey wdStory, True
If Selection.Information(wdActiveEndPageNumber) <> 200 Then
BigDoc.Content.Select
End If
.Cut
Set NewDoc = Documents.Add
With NewDoc
.Content.Paste
SeqNo = SeqNo + 1
.SaveAs "Part" & SeqNo & ".doc" ' <=== Full Path and Name here
.Close
End With
End With
Wend
Application.ScreenUpdating = True
Set NewDoc = Nothing
Set BigDoc = Nothing
End Sub
--
Enjoy,
Tony
> Tx for the help Tony but something is not working. I think that a end
> if is missing somewhere. I'm trying to find where but no luck so far.
[quoted text clipped - 38 lines]
> > > Yes I agree, but it's not a 1 time thing, I have to do that often so
> > > that why I was aking that
olemaitre@legermarketing.com - 08 Nov 2005 23:56 GMT
Tx again to have answered so fast. I'm must probably be pretty dumb I'm
not able to get it to work. I have changed the path, that's setting is
ok but even if change numer of page, it always give me only 1 file
with all the content in it. I have tried changind the <>200 but no luck
either. Can you tell me what am I doing wrong? Tx a lot :)
Tony Jollans - 09 Nov 2005 00:19 GMT
Having to guess abit here - if this doesn't help can you post the exact code
you're using and say what Word version you have.
The code generates unique file names using a sequential number (SeqNo).
Might you have replaced that when you added your path?
It might also be worth trying changing ..
If Selection.Information(wdActiveEndPageNumber) <> 200 Then
To
If Selection.Information(wdActiveEndPageNumber) < 200 Then
--
Enjoy,
Tony
> Tx again to have answered so fast. I'm must probably be pretty dumb I'm
> not able to get it to work. I have changed the path, that's setting is
> ok but even if change numer of page, it always give me only 1 file
> with all the content in it. I have tried changind the <>200 but no luck
> either. Can you tell me what am I doing wrong? Tx a lot :)
olemaitre@legermarketing.com - 08 Nov 2005 23:02 GMT
Tx for the help Tony but something is not working. I think that a end
if is missing somewhere. I'm trying to find where but no luck so far.
If you could check it, I will really appreciate
> OK, try this then ..
>
[quoted text clipped - 34 lines]
> > Yes I agree, but it's not a 1 time thing, I have to do that often so
> > that why I was aking that
Richard Lawson - 08 Nov 2005 23:23 GMT
I would like to know how this works out. I have a project where a dozen
people run reports many times a day. The result is a single Word document
which then has to be broken into single pages and saved.
> Tx for the help Tony but something is not working. I think that a end
> if is missing somewhere. I'm trying to find where but no luck so far.
[quoted text clipped - 39 lines]
>> > Yes I agree, but it's not a 1 time thing, I have to do that often so
>> > that why I was aking that
Doug Robbins - Word MVP - 09 Nov 2005 05:24 GMT
Sub splitter()
'
' splitter Macro
' Macro created 16-08-98 by Doug Robbins to save each page of a document
' as a separate file with the name Page#.DOC
'
Dim Counter As Long, Source As Document, Target As Document
Set Source = ActiveDocument
Selection.HomeKey Unit:=wdStory
Pages = Source.BuiltInDocumentProperties(wdPropertyPages)
Counter = 0
While Counter < Pages
Counter = Counter + 1
DocName = "Page" & Format(Counter)
Source.Bookmarks("\Page").Range.Cut
Set Target = Documents.Add
Target.Range.Paste
Target.SaveAs FileName:=DocName
Target.Close
Wend
End Sub

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I would like to know how this works out. I have a project where a dozen
>people run reports many times a day. The result is a single Word document
[quoted text clipped - 44 lines]
>>> > Yes I agree, but it's not a 1 time thing, I have to do that often so
>>> > that why I was aking that