Import Table containing complex objects to another Word Document.

Home Forums WordprocessingML Import Table containing complex objects to another Word Document.

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Eric White 8 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2506

    princrai
    Participant

    Hi Eric,

    I am trying to import a table object from a word document to anther word document . This table contains chart,smartart or image in their table cell. When I do an import using MainDocumentPart.Document.Body.AppendChild(new Table(table.OuterXml)) it doesn’t work properly. On investigation I found that in the table xml there are references to the charts,smart art xml object which were missing when imported this table to a new document. This works fine if there are not references in the table cell to other objects(simply text) . Can you help me on how to import these types of complex table objects to another document.

    Thanks,
    Prince

    #2507

    Eric White
    Keymaster

    Hi Prince,

    What you need to use is DocumentBuilder, which will appropriately bring in referenced charts, smart art, images, everything.

    Please see the following content on DocumentBuilder:

    DocumentBuilder Developer Center

    In particular, pay attention to #8, Fine-grained control when importing content using DocumentBuilder.

    Cheers, Eric

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.