I use mail merge to generate letters. These are then merged into one large document which I used to use a splitter for when using Word 2003.
Now I am using Word 2010 and when I run the macro it edits the document, and rather than fitting everything on one page it plays around with it so it is split between 2.
I am using the following macro:
Sub SplitMerge() ' 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 Dim Letters As String Dim Counter As Long Dim DocName As String Dim oDoc As Document Dim oNewDoc As Document Set oDoc = ActiveDocument oDoc.Save Selection.EndKey Unit:=wdStory Letters = Selection.Information(wdActiveEndSectionNumber) Selection.HomeKey Unit:=wdStory Counter = 1 Default = "Merged" MyText = "Commencement Letter" Title = "File Name" MyName = InputBox(MyText, Title, Default) If MyName = "" Then End Default = "T:\Lead Employer Service\HR Team\!Recruitment Team\!National Recruitment\2012\GP's\SUCCESSFUL CANDIDATES\" Title = "Path" MyText = "Enter path" MyPath = InputBox(MyText, Title, Default) If MyPath = "" Then End While Counter < Letters Application.ScreenUpdating = False DocName = MyPath & MyName & " " & _ LTrim$(Str$(Counter)) & ".doc" oDoc.Sections.First.Range.Cut Set oNewDoc = Documents.Add 'Documents are based on the Normal template 'To use an alternative template follow the link. With Selection .Paste .EndKey Unit:=wdStory .MoveLeft Unit:=wdCharacter, Count:=1 .Delete Unit:=wdCharacter, Count:=1 End With oNewDoc.SaveAs FileName:=DocName, _ FileFormat:=wdFormatDocument, _ AddToRecentFiles:=False ActiveWindow.Close Counter = Counter + 1 Application.ScreenUpdating = True Wend oDoc.Close wdDoNotSaveChanges End Sub
I have read on another page that this is a compatability issue but I'm not sure how to resolve it. I am pretty new to all this though, so as detailed advice as possible will be much appreciated.