Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] blake.keller@gmail.com is offline
external usenet poster
 
Posts: 3
Default Insert a separator page when a record changes

I am trying to get Word 07 mail merge to insert a separator page
between changes in a certain field in a set of records. My data
source has records that have a field that changes about every 20 to
thirty lines. When that field changes, I need Word to drop in a
seperator page with the new value of that field. Example: The name
Mr. Smith may appear 24 times in a row then change to Mr. Jones, when
this occurs I need a seperator page inserted.

I know that VDP products like PrintShop Mail can do this but the
information that I am printing is so simple it is hard to justify the
cost. Any help would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Insert a separator page when a record changes

Hi Blake,

The following field coding shows how to conditionally insert a new page, using a mergefield whose name is 'Data' (substitute with
your own field name):
{IF{MERGEREC}= 1 {SET OldValue {MERGEFIELD Data}} {IF{MERGEFIELD Data}= {OldValue} "" "{QUOTE 12}{SET OldValue {MERGEFIELD Data}}"}}
Note that all the braces shown in the above a field braces, which you create in pairs via Ctrl-F9 - you can't simply type them in or
copy them from this post. Also, pay special attention to the spacing. The page break is created by the {QUOTE 12} field - you could
insert an actual page break into the code at this point instead.

Cheers


wrote in message ...
I am trying to get Word 07 mail merge to insert a separator page
between changes in a certain field in a set of records. My data
source has records that have a field that changes about every 20 to
thirty lines. When that field changes, I need Word to drop in a
seperator page with the new value of that field. Example: The name
Mr. Smith may appear 24 times in a row then change to Mr. Jones, when
this occurs I need a seperator page inserted.

I know that VDP products like PrintShop Mail can do this but the
information that I am printing is so simple it is hard to justify the
cost. Any help would be greatly appreciated.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] blake.keller@gmail.com is offline
external usenet poster
 
Posts: 3
Default Insert a separator page when a record changes

On Jul 2, 8:24*pm, "macropod" wrote:
Hi Blake,

The following field coding shows how to conditionally insert a new page, using a mergefield whose name is 'Data' (substitute with
your own field name):
{IF{MERGEREC}= 1 {SET OldValue {MERGEFIELD Data}} {IF{MERGEFIELD Data}= {OldValue} "" "{QUOTE 12}{SET OldValue {MERGEFIELD Data}}"}}
Note that all the braces shown in the above a field braces, which you create in pairs via Ctrl-F9 - you can't simply type them in or
copy them from this post. Also, pay special attention to the spacing. The page break is created by the {QUOTE 12} field - you could
insert an actual page break into the code at this point instead.

Cheers



wrote in ...
I am trying to get Word 07 mail merge to insert a separator page
between changes in a certain field in a set of records. *My data
source has records that have a field that changes about every 20 to
thirty lines. *When that field changes, I need Word to drop in a
seperator page with the new value of that field. *Example: *The name
Mr. Smith may appear 24 times in a row then change to Mr. Jones, when
this occurs I need a seperator page inserted.


I know that VDP products like PrintShop Mail can do this but the
information that I am printing is so simple it is hard to justify the
cost. *Any help would be greatly appreciated.- Hide quoted text -


- Show quoted text -


Thanks for the help. That appears to be getting me on the right track
but the page breaks are appearing just before the section break in
each merged letter and not actually inserting a blank page except for
the end of the merged document. I can supply a copy of the merge form
and a sample database if that would help. Thanks again.
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] blake.keller@gmail.com is offline
external usenet poster
 
Posts: 3
Default Insert a separator page when a record changes

Great! Thanks for the help. The other question that I have is there
a way to get a a certain field to only print on those separator
pages? Also, how can I configure Word to give those separator pages a
different size than the normal pages. The normal pages are 12"x16"
and I would like to make the seperator pages be 13"x16". My printer
will handle tray calls as it will know what paper is where. Thanks
again for your help.

  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Insert a separator page when a record changes

It might be easier to execute the merge to a new document, then use a
modification of a macro such as

Sub splitter()
' splitter Macro
' Macro created by Doug Robbins to save each letter created by a mailmerge
' as a separate file, retaining the header and footer information.
Dim i As Long, Source As Document, Target As Document, Letter As Range
Set Source = ActiveDocument
For i = 1 To Source.Sections.Count
Set Letter = Source.Sections(i).Range
Set Target = Documents.Add
Target.Range = Letter
Target.Sections(2).PageSetup.SectionStart = wdSectionContinuous
Target.SaveAs FileName:="Letter" & i
Target.Close
Next i
End Sub

to split that document into separate files into each of which the separator
page was inserted (by inserting a NextPage Section Break at the beginning of
the document and formatting the then first page of the document so that it
was the desired sizze) and have it print the file without being saved. If
the mergefield that will contain the data that is to appear on the separator
page was the first paragraph of the mailmerge main document, the macro could
cut the corresponding paragraph from each file and paste it onto the
separator page.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

wrote in message
...
Great! Thanks for the help. The other question that I have is there
a way to get a a certain field to only print on those separator
pages? Also, how can I configure Word to give those separator pages a
different size than the normal pages. The normal pages are 12"x16"
and I would like to make the seperator pages be 13"x16". My printer
will handle tray calls as it will know what paper is where. Thanks
again for your help.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I record a message to insert in Powerpoint, website etc? tws Microsoft Word Help 1 May 9th 08 07:16 PM
Creating a Template with a Separator Page Rebecca[_2_] Microsoft Word Help 1 March 21st 08 02:48 PM
Word 2003 'Insert Style Separator' Feature Sue Hughes Microsoft Word Help 1 September 10th 05 12:27 AM
Recipients do not insert into labels, says next record Elizabeth Mailmerge 1 June 29th 05 08:12 PM
Using ~~~ as a Page Separator The Yard Page Layout 1 February 2nd 05 08:18 PM


All times are GMT +1. The time now is 03:23 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"