View Single Post
  #6   Report Post  
Charles Kenyon
 
Posts: n/a
Default

See http://www.gmayor.com/individual_merge_letters.htm which does
automatically name the documents. See
http://addbalance.com/word/wordwebre....htm#mailmerge for more mailmerge
links.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"sayling" wrote in message
...
Hmmm

This almost sounds like what I am looking for...

I have a document that gets merged to email automatically ( ie it runs
unattended at present). I am looking to try and get the subject of the
email
to equal a couple of merge fields from the document (such as a date field
and
a customer field, both held in the data source) using Word and Outlook
2000.

I get the impression that it would be easier to have the merge set to
produce different documents and let the email subject default to the
document
name. So it sounds as though your 'throw away' splitter might do the job,
but
(and you'll have to excuse my vba ignorance here) it appears that manual
intervention is required here...

Have I missed the point, or can the whole process be automated?

"Doug Robbins" wrote:

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

If you want each file to be named based on one of the fields in the data
source,
here's a method that I have used that involves creating a separate
catalog type mailmerge maindocument which creates a word document
containing
a table in each row of which would be your data from the database that
you
want to use as the filename.

You first execute that mailmerge, then save that file and close it. Then
execute the mailmerge that you want to create the separate files from and
with the
result of that on the screen, run a macro containing the following code
and when the File open dialog appears, select the file containing the
table
created by the first mailmerge

' Throw Away Macro created by Doug Robbins
'
Dim Source As Document, oblist As Document, DocName As Range,
DocumentName
As String
Dim i As Long, doctext As Range, target As Document
Set Source = ActiveDocument
With Dialogs(wdDialogFileOpen)
.Show
End With
Set oblist = ActiveDocument
Counter = 1
For i = 1 To oblist.Tables(1).Rows.Count
Set DocName = oblist.Tables(1).Cell(i, 1).Range
DocName.End = DocName.End - 1

'Change the path in the following command to suit where you want to
save
the documents.
DocumentName = "I:\WorkArea\Documentum\" & DocName.Text
Set doctext = Source.Sections(i).Range
doctext.End = doctext.End - 1
Set target = Documents.Add
target.Range.FormattedText = doctext
target.SaveAs FileName:=DocumentName
target.Close
Next i


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a
paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"chartwell52655" wrote in
message
...
How do I separate each document when the template I am merging from
contains
section breaks?

"Doug Robbins" wrote:

Assuming that you are using FilePrint with a .PDFing thingy set to
create
the PDF, use the following macro on the document created by executing
the
mailmerge to a new document

Dim i as Long
For i = 1 to ActiveDocument.Sections.Count
ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="s" & i,
To:="s"
& i
Next i


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a
paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Horta" wrote in message
...
I am creating a 30 letter mail merge and I would like to be able to
pdf
each
letter to forward electronically. I have no problems with the mail
merge,
or
the pdf, but cannot find a way to seperate each letter without
cutting
and
pasting each letter into another document.