Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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"
  Set oNewDoc = Documents.Add
  'Documents are based on the Normal template
  'To use an alternative template follow the link.
  With Selection
    .EndKey Unit:=wdStory
    .MoveLeft Unit:=wdCharacter, Count:=1
    .Delete Unit:=wdCharacter, Count:=1
  End With
  oNewDoc.SaveAs FileName:=DocName, _
  FileFormat:=wdFormatDocument, _
  Counter = Counter + 1
  Application.ScreenUpdating = True
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.

share|improve this question
Why don't you insert a page break where you want the new page to start. If you only want one page, try changing the margins of the page to make the data fit onto one page. – wbeard52 Jun 18 '12 at 16:09
Its not the fact that it is on 2 pages that is the problem. it is changin the format of the docuemtn and putting like lots of spaces between paragraphs and things the docuemtn just doesnt look correct address block has moved and things – Sean Chadwick Jun 20 '12 at 8:41
Seems like this is a compatability issue as i have run the same macro using both excel 2003 and word 2003 and it did work but my letter head vanished from the output files any ideas? – Sean Chadwick Jun 20 '12 at 12:15

You must log in to answer this question.

Browse other questions tagged .