Hello All,

We need to merge two rtf documents automatically without the user seeing.
The combined product of this merge is then shown to the user.

Currently we :

open the docs using notepad,
remove the last outer brace from the first doc
and the first outer brace from the second.
We then save them to a new rtf text document and then open this in word.

However this is causing problems with font tables and other items in the
headers of the rtf.

We have tested using Word automation but want to know if there is any other
way or a recommended way of doing this?

We currently do the merging of the rtf on the server side. Moving to using
Word Automation will mean we need to rely on the COM component server side
which as the following link shows is not a good idea:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

We are considering moving the merging client side and therefore we can use
Word automation but this does add extra time to the client viewing the
document.

I presume that the method of merging the rtf by removing the braces is a
complete no no? Has anyone ever tried doing it this way? If we can
categorically rule this out we can push forward with the Word Automation.

Thanks for your help

Re: How to merge two raw rtf documents? by Peter

Peter
Wed Aug 02 15:28:06 CDT 2006

In the general case it does not work for the reason you mentioned, i.e. at
the top of each RTF file there are tables of fonts and styles which are
referenced in the "body" part of the rtf. The best you can probably do is to
do a little bit more coding to:
a. go through the various tables in the header section of document A
b. strip off the header section of document B
c. apply "document A" names and references everywhere

I have no idea how difficult that would be, but I wouldn't particularly want
to have to make sure it always worked...

Peter Jamieson

"iconmsdn" <iconmsdn@discussions.microsoft.com> wrote in message
news:869FE8C2-2FF7-4EB7-8A8C-F33EC0271FB1@microsoft.com...
> Hello All,
>
> We need to merge two rtf documents automatically without the user seeing.
> The combined product of this merge is then shown to the user.
>
> Currently we :
>
> open the docs using notepad,
> remove the last outer brace from the first doc
> and the first outer brace from the second.
> We then save them to a new rtf text document and then open this in word.
>
> However this is causing problems with font tables and other items in the
> headers of the rtf.
>
> We have tested using Word automation but want to know if there is any
> other
> way or a recommended way of doing this?
>
> We currently do the merging of the rtf on the server side. Moving to
> using
> Word Automation will mean we need to rely on the COM component server side
> which as the following link shows is not a good idea:
>
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
>
> We are considering moving the merging client side and therefore we can use
> Word automation but this does add extra time to the client viewing the
> document.
>
> I presume that the method of merging the rtf by removing the braces is a
> complete no no? Has anyone ever tried doing it this way? If we can
> categorically rule this out we can push forward with the Word Automation.
>
> Thanks for your help
>



Re: How to merge two raw rtf documents? by iconmsdn

iconmsdn
Tue Aug 08 10:58:02 CDT 2006

Thanks Peter, Yes unfortuantely is does get rather complicated!

"Peter Jamieson" wrote:

> In the general case it does not work for the reason you mentioned, i.e. at
> the top of each RTF file there are tables of fonts and styles which are
> referenced in the "body" part of the rtf. The best you can probably do is to
> do a little bit more coding to:
> a. go through the various tables in the header section of document A
> b. strip off the header section of document B
> c. apply "document A" names and references everywhere
>
> I have no idea how difficult that would be, but I wouldn't particularly want
> to have to make sure it always worked...
>
> Peter Jamieson
>
> "iconmsdn" <iconmsdn@discussions.microsoft.com> wrote in message
> news:869FE8C2-2FF7-4EB7-8A8C-F33EC0271FB1@microsoft.com...
> > Hello All,
> >
> > We need to merge two rtf documents automatically without the user seeing.
> > The combined product of this merge is then shown to the user.
> >
> > Currently we :
> >
> > open the docs using notepad,
> > remove the last outer brace from the first doc
> > and the first outer brace from the second.
> > We then save them to a new rtf text document and then open this in word.
> >
> > However this is causing problems with font tables and other items in the
> > headers of the rtf.
> >
> > We have tested using Word automation but want to know if there is any
> > other
> > way or a recommended way of doing this?
> >
> > We currently do the merging of the rtf on the server side. Moving to
> > using
> > Word Automation will mean we need to rely on the COM component server side
> > which as the following link shows is not a good idea:
> >
> > http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
> >
> > We are considering moving the merging client side and therefore we can use
> > Word automation but this does add extra time to the client viewing the
> > document.
> >
> > I presume that the method of merging the rtf by removing the braces is a
> > complete no no? Has anyone ever tried doing it this way? If we can
> > categorically rule this out we can push forward with the Word Automation.
> >
> > Thanks for your help
> >
>
>
>