Unfortunately I suspect you will have real difficulty getting this to work
withut resorting to some VBA and postprocessing, since the {REF}/{fieldname}
approach is an undocumented trick that can't really be relied on as you have
discovered, and there is no other simple way to get formatted text from a
data source in a merge.
The only fairly obvious things I can think of are
a. there could be a paragraph style clash between the HTML file and your
mail merge main document.
b. the first paragraph could be more affected by the formatting of the
paragraph containing the {fieldname} field than the other paragraphs
I think in your situation I would consider one of the following
a. doing the merge to an output document then using Find/Replace and/or VBA
to fix the formatting (if it is always clear what it needs to be, and you
can easily locate the texts to be fixed)
b. convert the HTML to a .doc before merging and see if that makes any
difference
c. seeing if I could extract and re-use the correct formatted text directly
from the HTML using Word VBA, then perhaps "roll my own" merge code to do
the job.
Best I can do, sorry!
--
Peter Jamieson - Word MVP
> Hi,
>
[quoted text clipped - 26 lines]
> Mobile: 04399 65747
> EMail: kristin.mckechie@OpusInternational.com.au
Hi Peter.
Believe it or not, your response has helped me to solve
this issue...
Using your idea of converting the html to .doc format, I
found that the merge would run fine using the {fieldname}
approach. I then resaved the new .doc source file back to
html using Word and tried again... and again the file
merged successfully...
I have now rebuilt my PHP script to generate an output
file from the web which exactly matches the html file
format (including the xml header block) created by Word
and all is sweet... A little bit round about, but at the
end of the day, I'm happy with whatever works...
Cheers
Kris M.
>-----Original Message-----
>Unfortunately I suspect you will have real difficulty getting this to work
[quoted text clipped - 56 lines]
>
>.
Peter Jamieson - 26 Nov 2003 06:12 GMT
Kris,
Well done! Very interesting & thanks for the feedback.
--
Peter Jamieson - Word MVP
> Hi Peter.
>
[quoted text clipped - 97 lines]
> >
> >.