MailMerge Problems

A

Andy

Hi All..I am doing a mailmerge in word 2002, and have found a little program called
MMtoDocs.Zip which creates a new file and saves them individually as the
mailmerge runs. the only problem is that it changes the formatting from the
original to the merged documents.

Basically I have to run a mail merge for 200 documents, apart from printing
them I also need to split them up and save them with specific file names.
Does anyone have an easy way of doing this. The MMtoDocs.Zip file is great,
except it changes the formatting and then defies to point of the whole merge
if I have to go through all the docs and reformat them.

Please Help... it's driving me bonkers...

Thanks
Andy
 
C

Clive Huggan

Hello Andy,

You've landed in a discussion group for users of Mac versions of Word. We
don't have the MMTDocs application on the Mac.

Although there are several people here who are experts in both Mac and PC,
and they may come by soon, you're likely to get quicker results in a
discussion group for PC Word. Start here:
http://www.microsoft.com/office/community/en-us/FlyoutOverview.mspx

Cheers,

Clive Huggan
Canberra, Australia
(My time zone is 5-11 hours different from North America and Europe, so my
follow-on responses to those regions can be delayed)
============================================================
 
C

CyberTaz

Hi Andy -

You might want to contact the source of that add-in - I haven't personally
used it, but my understanding is that the individual docs created should be
replicas of the original merged doc as though they were paper towels with
the section breaks representing perforations. Send an inquiry to:

http://www.gmayor.com/index.htm

using the Send Email link at the bottom of that page. Be sure to include
pertinent version information about your copy of Word, the structure of the
document as well as which version of the MMtoDoc macro you're actually using
- it has been revised a number of times over the years. The version is
displayed in the template's name when you extract the .zip and should appear
as MMtoDocsRevnn.DOT, where the an indicates the version number.

Since you don't mention the specific source it's possible you have the wrong
version for your version of Word. The whole story is also available on
Graham's site if you don't already have the link:

http://www.gmayor.com/individual_merge_letters.htm

Good Luck |:>)
Bob Jones
[MVP] Office:Mac
 
P

Peter Jamieson

For Windows Word mailmerge issues, you're better off posting in the
microsoft.public.word.mailmerge.fields group (which I believe Microsoft
communities still calls "Mailmerge and Fax")

If your mailmerge produces exactly one document for each record in the data
source, you can also consider trying the following VBA code (I haven't
tested the "print and save in one" aspect of this, though, and you might
find it is better to merge to the output document, then print it before
closing).

Peter Jamieson

Sub PrintSave1DocPerSourceRec()
'


' NB, needs bettor error management and doubtless other things a VBA expert
' will point out.


Dim intSourceRecord
Dim objMerge As Word.MailMerge
Dim strOutputDocumentName As String
Dim TerminateMerge As Boolean


' Need to set up this object as the ActiveDocument changes when the
' merge is performed. Besides, it's clearer.


Set objMerge = ActiveDocument.MailMerge
With objMerge


' If no data source has been defined, do it here using OpenDataSource.
' But if it is already defined in the document, you should not need to
define it here.

' .OpenDataSource _
' Name:="whatever"

intSourceRecord = 1
TerminateMerge = False

Do Until TerminateMerge
.DataSource.ActiveRecord = intSourceRecord

' if we have gone past the end (and possibly, if there are no records)
' then the Activerecord will not be what we have just tried to set it to

If .DataSource.ActiveRecord <> intSourceRecord Then
TerminateMerge = True
' the record exists
Else

' while we are looking at the correct activerecord,
' e.g. - you will need to change this -
' to create the document path name from a standard
' path and a field in the data source called "my field"...
' ensure that the field name either exactly matches the
' name in the data source (capitalisation is significant here)
' or, in cases where Word modifies the name, have a look in VBA
' to see what name it is using, and use that

strOutputDocumentName = _
"c:\mydoc\" & _
.DataSource.Datafields("my field").Value & ".doc"

.DataSource.FirstRecord = intSourceRecord
.DataSource.LastRecord = intSourceRecord

' merge once to the printer

.Destination = wdSendToPrinter
.Execute

' then again to a new document

.Destination = wdSendToNewDocument
.Execute

' The Activedocument is always the output document
' Add any parameters you need to these calls
ActiveDocument.SaveAs strOutputDocumentName
ActiveDocument.Close
intSourceRecord = intSourceRecord + 1
End If
Loop
End With
End Sub
 

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