Copy text from one document to another

M

mcphc

I would like a macro to copy all text (except headers and footers) from all
pages or selected text (except the first page) from A.doc to B.doc. I think I
need each page to be copied and pasted indivdually so that header, footer,
page setups etc do not get copied from A.doc to B.doc, I just want the text
and text formatting.

Thanks
 
J

Jonathan West

mcphc said:
I would like a macro to copy all text (except headers and footers) from all
pages or selected text (except the first page) from A.doc to B.doc. I
think I
need each page to be copied and pasted indivdually so that header, footer,
page setups etc do not get copied from A.doc to B.doc, I just want the
text
and text formatting.

Thanks

So long as there are no section breaks within the source document, you can
copy the whole of the text you want copied in one go. Just ensure that you
exclude the final paragraph mark of the document from the text you copy.

You can copy formatted text from one document to another using VBA without
the need to use the clipboard. Look up the FormattedText property in VBA
Help. There are code examples there for you.
 

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