Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 02-22-2016, 04:03 AM
macropod's Avatar
macropod macropod is offline Copying paragraphs from multiple documents to the current one. Windows 7 64bit Copying paragraphs from multiple documents to the current one. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You cannot copy content from a document without opening it. That said, you could hide the documents being opened by changing:
Set oDoc = Documents.Open(strPath & strFilename)
to:
Set oDoc = Documents.Open(strPath & strFilename, False, True, False, , , , , , , , False)

The reason for only the last document's content displaying is that the code needs to have something like:
oRng2.InsertAfter vbCr
oRng2.Collapse wdCollapseEnd
inserted after:
oRng2.Text = oRng.Paragraphs(1).Range.Text
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying tables between Word documents FIN Word 1 02-10-2015 05:59 PM
Copying Selected Text Between Word Documents Iluvatar343 Word VBA 1 06-05-2014 05:15 AM
Copying paragraphs from multiple documents to the current one. Find and Replace multiple lines/paragraphs jcw Word 1 11-18-2011 11:47 AM
Copying paragraphs from multiple documents to the current one. MS Excel 2004 for Mac - copying dates between documents BCRenton Excel 4 11-10-2009 07:28 AM
Copying tables between Word documents best practices? dylane Word Tables 0 12-18-2008 12:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft