Merge to seperate documents

M

Matty_b

Hi, Is it possible in MSword to merge to seperate documents, because when i
click merge to new document it blocks them all in one document and then i
have to seperate them out manually which is very time consuming with over 100
records,
Thanks
 
M

Matty_b

I found your website when searching through google looking for the answer and
tryed you macro but couldnt get it to work, can you give me a walk through of
how to make this work, and also more information on what the outcome should
be?

Thanks for you help
 
D

Doug Robbins

Try this one:

Sub splitter()

' splitter Macro

' Macro created by Doug Robbins to save each letter created by a mailmerge
as a separate file.

Dim i As Long, Source as Document, Target as Document, Letter as Range
Set Source = ActiveDocument
For i = 1 to Source.Sections.Count
Set Letter = Source.Sections(i).Range
Letter.End=Letter.End-1
Set Target = Documents.Add
Target.Range=Letter
Target.SaveAs FileName:="Letter" & i
Target.Close
Next i

End Sub


--
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
 
G

Graham Mayor

I am curious to discover what problems you had - and given that the posted
code is based on one of Doug's macros, the alternative he has posted may be
similarly problematical. For installing macros from listings, see my other
page http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Matty_b

I've got Dougs macro to work but it doesnt keep all my table formating as
all the information in the mail merge is put into different areas of the
table, the output of the macro is just a list of information unformated, I
dont know if either you or Doug can help me,

Thanks for your assistance
 
G

Graham Mayor

This is beginning to sound like a non-standard form letter merge document. A
form letter merge (which the macro is intended to split) separates the
individual merge 'documents' by section breaks and the macro splits the file
along those section breaks. You seem to be doing something quite different.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Matty_b

This is what i have done,

I have created an Access Database for the user to enter data using a form,
then the information get merged into a word document, the word document has a
number of tables and images, when it merges it is all in one document and i
would like it split out into seperate files/documents, when i used Doug's
macro it only split the information from 1 record into a new document, and it
only had the merge text,

Hope this helps,
 
G

Graham Mayor

Did you merge to a new document and then run the macro on that merged new
document?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

That's a relief :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Manoj Talwar

I was looking for a code that would enable me to split multiple pages i
a merged document to separate documents for example I have a templat
with 3 pages - when merged using a normal mail-merge for 5 people, i
creates a merged document with 15 pages (i.e. 5 people with 3 page
each). Now when I use a macro "Splitter" from the Topic "Individua
Merge Letters", it splits the documents one page at a time creating 1
documents in this caserather than 5 documents.

Any suggestions pls.

Kind regards,
Mano
 
D

Doug Robbins - Word MVP

Use

Sub splitter()

' Macro created by Doug Robbins to save each letter created by a mailmerge
as a separate file.

Dim i As Long, Source as Document, Target as Document, Letter as Range
Set Source = ActiveDocument
For i = 1 to Source.Sections.Count
Set Letter = Source.Sections(i).Range
Letter.End=Letter.End-1
Set Target = Documents.Add
Target.Range=Letter
Target.SaveAs FileName:="Letter" & i
Target.Close
Next i

End Sub


--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top