Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2007

Tip: Looking for answers? Try searching our database.

Copy text from one document to another

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mcphc - 20 Aug 2007 17:38 GMT
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
Jonathan West - 20 Aug 2007 18:08 GMT
>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
[quoted text clipped - 5 lines]
>
> 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.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.