View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Graham Mayor -- individual merge letters

You are right - we are not on the same page. I asumed that yuou meant Doug's
add-in about which this issue has come up before. The principle is still the
same however especially as this macro was developed from another of Doug's
.

Find the line
Documents.Add
and
change it to
Documents.Add(Template:="c:\path\[TemplateName].dot")
substituting the path and template name as indicated in Doug's suggestion.

That hopefully will do the trick.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



zoolaw444 wrote:
Grahan, I appreciate your prompt response but I'm confused.

First of all, to make sure we're on the same page, this is the macro
I'm using:

Sub SplitMerge()
' splitter Macro
' Macro created 16-08-98 by Doug Robbins to save each letter created
by a ' mailmerge as a separate file.
' with modifications by Graham Mayor 16-06-03 & 08-10-04

Dim Title As String
Dim Default As String
Dim MyText As String
Dim MyName As Variant
Dim MyPath As String

Selection.EndKey Unit:=wdStory
Letters = Selection.Information(wdActiveEndSectionNumber)
Selection.HomeKey Unit:=wdStory
Counter = 1

Default = "Merged"
MyText = "Enter a filename. Long filenames may be used."
Title = "File Name"
MyName = InputBox(MyText, Title, Default)
If MyName = "" Then
End
End If

Default = "D:\My Documents\Test\"
Title = "Path"
MyText = "Enter path"
MyPath = InputBox(MyText, Title, Default)
If MyPath = "" Then
End
End If

While Counter Letters
Application.ScreenUpdating = False
Docname = MyPath & LTrim$(Str$(Counter)) & " " & MyName & ".doc"

ActiveDocument.Sections.First.Range.Cut
Documents.Add
With Selection
.Paste
.EndKey Unit:=wdStory
.MoveLeft Unit:=wdCharacter, Count:=1
.Delete Unit:=wdCharacter, Count:=1
End With
ActiveDocument.SaveAs FileName:=Docname, FileFormat:=wdFormatDocument
ActiveWindow.Close
Counter = Counter + 1
Application.ScreenUpdating = True
Wend
End Sub

Is it here in the macro code itself that I need to replace the line
of code you indicated? If so, I don't see the "Private Sub
app_MailMergerAfterMerge(ByVal Doc As Document, ByVal DocResult As
Document)" part that you said to replace. If not, then please tell me
where to find this in order to replace it because... I'm a total
beginner here.

Your help is GREATLY appreciated!