Q for Graham or Doug - Split Merge

J

jerem

Hi Graham and/or Doug,

Graham, I went on to the website you recommended and grabbed the split merge
code and pared it down to what you see below in order to get it to save to a
document management system, rather than a local drive. Works great - one
little hitch - is there any chance of being specific as to what type of
Section break it cuts and pastes: ActiveDocument.Sections.First.Range.Cut.
Any way of saying do the cut at a Next Section Break not at a Continous
Section Break. Looked in intellisense to see if there was anything which
specifies this - no luck.

Why would I want to do this? In the merge letters that I work with there is
a continuous section break at the top of every merge letter because there are
different Left and Right margins for the top of each letter to accommodate
for fitting into a preprinted firm letterhead logo. So, when you run this
merge it splits the top portion of the letter from the bottom portion of the
single page letter. Any remedy to this through looking for a specific type
of section break or through any other means????

Thanks as always for your help, ideas and suggestions.

Selection.EndKey Unit:=wdStory
Letters = Selection.Information(wdActiveEndSectionNumber)
Selection.HomeKey Unit:=wdStory
Counter = 1
While Counter < Letters
Application.ScreenUpdating = True
ActiveDocument.Sections.First.Range.Cut
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
Selection.HomeKey Unit:=wdStory
ActiveWindow.Close
Counter = Counter + 1
Application.ScreenUpdating = True
Wend
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