Copying consecutive pages of a .DOC into another documnt's table cells

P

Primoz Bradac

Hi all,

I'd like to create a macro to copy consecutive pages in a word document
into cells of a table in a separate .doc file. (Each page into separate
cell).

The problem I face is how to "put" a page in the source document into a
range object to subsequently get its contents and "formatting" and
deliver them into the target cell.

Additional question: What if the source page contains a picture or a
text box.

TIA,
Primoz Bradac
 
D

Doug Robbins - Word MVP

Use the .Range of the inbuilt bookmark \page to get the content of the page
on which the selection is located. Then use the .FormattedText property of
that range to get the formatted text. After setting the .FormattedText
range of the Cell equal to the .FormattedText property of the .Range, use
..Cut to delete the .Range from the source document and then repeat the
sequence as required. Finally, close the source document without saving.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top