Reply
 
Thread Tools Display Modes
  #1   Report Post  
Gordon Detlor
 
Posts: n/a
Default How to retain formatting when using IncludeText in Merge?

USING: Word 2002 SP-1, Excel 2002 SP-1, WinXP Pro v5.1 SP2

TASK: Create multiple groups of insurance policy documents (one group per
client), with each group consisting of (a) a one-page main policy document,
with client-specific data (merged from Excel), (b) one or more pages of
state-specific policy endorsements, and (c) a final page that is the same
for every policy. Each document in the group must show its own unique
document number in the footer, along with the page# and the #pages in that
document (not the number of pages in the group or the entire batch of
groups).

PROBLEM: The state endorsement files look fine when viewed on their own, but
when merged into the group, they lose some formatting. In particular, they
use a paragraph style for headings w/ 12pt spacing after the paragraph. The
merge target document has 0pt spacing after paragraphs, and this seems to be
overriding the style of the merge source. In the merged document, there is
no separation between the heading and the following text.

ATTEMPTED SOLUTION: I tried putting each document in a separate section,
which worked for the footers (doc number and page numbering), but not for
the line spacing. Here's how the merge document is structured:

= = = = = = = = = =

[Section 1]

Main policy document w/ merge fields (this is always one-page when showing
merged data, though sometimes two when showing merge field codes).

Next Page break

[Section 2]

{ INCLUDETEXT "i:\\endorse\\{ MERGEFIELD "Policy_State" }.doc" }

Continuous section break



[Section N]

Disclaimer document (no merge fields; same regardless of which client or
state)





= = = = = = = = = =

Note regarding Section 2: The file included may have one or more sections in
it, depending upon how many state-specific documents there are. If more than
one, there is a Next Page section break between them. I also tried adding
"\* mergeformat" (without the quotes) just left of the right curly brace,
but that caused even more formatting problems.



Please pardon the length. I'm trying to give you all the relevant info to
avoid wasting your time. Any help would be much appreciated.




  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

This is almost certainly the expected behaviour if both documents are
formatted with the Normal Style. I would try creating a different style for
the paragraphs with the space after them. Apply that style to then and then
try executing the merge.

--
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
"Gordon Detlor" wrote in message
...
USING: Word 2002 SP-1, Excel 2002 SP-1, WinXP Pro v5.1 SP2

TASK: Create multiple groups of insurance policy documents (one group per
client), with each group consisting of (a) a one-page main policy
document, with client-specific data (merged from Excel), (b) one or more
pages of state-specific policy endorsements, and (c) a final page that is
the same for every policy. Each document in the group must show its own
unique document number in the footer, along with the page# and the #pages
in that document (not the number of pages in the group or the entire batch
of groups).

PROBLEM: The state endorsement files look fine when viewed on their own,
but when merged into the group, they lose some formatting. In particular,
they use a paragraph style for headings w/ 12pt spacing after the
paragraph. The merge target document has 0pt spacing after paragraphs, and
this seems to be overriding the style of the merge source. In the merged
document, there is no separation between the heading and the following
text.

ATTEMPTED SOLUTION: I tried putting each document in a separate section,
which worked for the footers (doc number and page numbering), but not for
the line spacing. Here's how the merge document is structured:

= = = = = = = = = =

[Section 1]

Main policy document w/ merge fields (this is always one-page when
showing merged data, though sometimes two when showing merge field codes).

Next Page break

[Section 2]

{ INCLUDETEXT "i:\\endorse\\{ MERGEFIELD "Policy_State" }.doc" }

Continuous section break



[Section N]

Disclaimer document (no merge fields; same regardless of which client or
state)





= = = = = = = = = =

Note regarding Section 2: The file included may have one or more sections
in it, depending upon how many state-specific documents there are. If more
than one, there is a Next Page section break between them. I also tried
adding "\* mergeformat" (without the quotes) just left of the right curly
brace, but that caused even more formatting problems.



Please pardon the length. I'm trying to give you all the relevant info to
avoid wasting your time. Any help would be much appreciated.






  #3   Report Post  
Gordon Detlor
 
Posts: n/a
Default

Doug, thanks for the quick reply!

I was hoping there would be a solution that involved editing just the one
file instead of 50, but at this point I'll be happy to get it done.

I forgot to mention that I also tried changing the paragraph style for
Section 2 in the include target file, i.e. the section that has the
IncludeText line in it, thinking it would override what was in the include
source.

This didn't work for me, but I think I now know why. I didn't use the same
style name as in the include source, so it didn't override the style used.
Since the include source paragraph style that is giving me problems is
"Normal", I tried changing that in the include target, but just for Section
2. No luck. It changed the style for the whole document (which doesn't
surprise me). And I can't change Normal to "Spacing After: 12pt", since the
first page (the policy doc w/ merged client data), uses it and needs to have
0pt spacing after paragraphs to fit on one page. But...light bulb
moment...what if I change THAT page to use a custom style? Then I COULD
change the Normal style as desired! I'll give that a try and report back.

"Doug Robbins" wrote in message
...
This is almost certainly the expected behaviour if both documents are
formatted with the Normal Style. I would try creating a different style
for the paragraphs with the space after them. Apply that style to then
and then try executing the merge.

--
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



  #4   Report Post  
Gordon Detlor
 
Posts: n/a
Default


"Gordon Detlor" wrote in message
...
: And I can't change Normal to "Spacing After: 12pt", since the
: first page (the policy doc w/ merged client data), uses it and needs to
have
: 0pt spacing after paragraphs to fit on one page. But...light bulb
: moment...what if I change THAT page to use a custom style? Then I COULD
: change the Normal style as desired! I'll give that a try and report back.

It looks like this would work, but the first page has so many different
relatively complex paragraph styles defined based on the Normal style (to
get a lot of info to fit on one page) that it would be more of a pain than
changing the 50 much-less-complex state endorsment files. (There are
actually six different versions of the main policy document.)


: "Doug Robbins" wrote in message
: ...
:: This is almost certainly the expected behaviour if both documents are
:: formatted with the Normal Style. I would try creating a different style
:: for the paragraphs with the space after them. Apply that style to then
:: and then try executing the merge.

This is the approach I'm going to use. Each state endorsement file
alternates several times between several different custom paragraph styles,
so it's not just a highlight all, change style deal.

Does anyone know of an easy way to search/replace styles, either via Word
commands or VBA? If you could point me to the appropriate object, I can get
details from help, or if you happen to have a code snippet, that would be
wonderful.


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
Retain original formatting Phil Shortell Mailmerge 1 April 19th 05 06:13 PM
How do I retain formatting from an Excel Data File to a Word Merg. Pookas Microsoft Word Help 5 March 14th 05 10:32 PM
Word Templates don't retain formatting MizDee Microsoft Word Help 1 March 7th 05 10:44 PM
How to retain specific formatting in the same line after field ent snidely Microsoft Word Help 4 January 17th 05 02:45 AM
Autotext item should retain paragraph formatting in effect at the. NickPiazza Microsoft Word Help 2 January 12th 05 06:15 PM


All times are GMT +1. The time now is 05:44 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"