![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Microsoft Office support MS Office support forum |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Oct 2008
Posts: 1
OS: Windows Server 2008
|
How to use VBA to copy and paste between Word Documents
I am trying to copy several documents and paste them into a new document using VBA. All I seem to be able to get is a blank new document. Could someone let me know what keywords I should be using to be able to open a document, copy all of it's content, then paste that into another already opened document?
Thanks! |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Registered User
Join Date: May 2008
Location: Baltimore, Maryland
Posts: 160
OS: Windows XP SP3
|
Re: How to use VBA to copy and paste between Word Documents
The following example opens a document named Birdie_Putt.doc, copies its content, and pastes that content into an already-open document named GolferGuy45.doc:
Code:
Sub Copy_Content()
Documents.Open "C:\Golf\Birdie_Putt.doc"
Selection.WholeStory
Selection.Copy
Documents("GolferGuy45.doc").Activate
Selection.EndKey wdStory
Selection.PasteAndFormat wdPasteDefault
End Sub
|
|
|
|
![]() |
| Thread Tools | |
|
|