J
Jon
I'm working with Word 2002 in a C# program. Document 1 is the master
document; basically a letter with attachments. Document 2 is form
designed using table. Document 2 is opened and cells in the form are
filled in programatically. Document 2 is then added to Document 1
using Range.InsertFile. Document 1 is then saved and closed. The
problem is that most of the time when I reopen Document 1, the
formatting of the inserted form (table) is all messed up. When I step
through the code and look at Document 1 right after the table is
inserted, it looks fine. But after Document 1 is closed and reopened,
the table formatting has changed, stretching a 1-1/2 page table into
10 to 15 pages. I've tried every combination I could think of in
terms of closing and opening the document, and have played with the
styles in both documents. Now the kicker. When I insert the table
into a different document (using the same C# code), it works fine.
I've tried as best I can to recreate in Document 1 the formatting from
the different document, but no luck. I know this is tough without
seeing it in action, but if anyone has run into a similar problem, any
advice would be appreciated.
document; basically a letter with attachments. Document 2 is form
designed using table. Document 2 is opened and cells in the form are
filled in programatically. Document 2 is then added to Document 1
using Range.InsertFile. Document 1 is then saved and closed. The
problem is that most of the time when I reopen Document 1, the
formatting of the inserted form (table) is all messed up. When I step
through the code and look at Document 1 right after the table is
inserted, it looks fine. But after Document 1 is closed and reopened,
the table formatting has changed, stretching a 1-1/2 page table into
10 to 15 pages. I've tried every combination I could think of in
terms of closing and opening the document, and have played with the
styles in both documents. Now the kicker. When I insert the table
into a different document (using the same C# code), it works fine.
I've tried as best I can to recreate in Document 1 the formatting from
the different document, but no luck. I know this is tough without
seeing it in action, but if anyone has run into a similar problem, any
advice would be appreciated.