Sub MergeDocs() Dim rng As Range Dim MainDoc As Document Dim strFile As String 'EDIT THIS TO INCLUDE YOUR PATH AND FOLDER NAME Const strFolder = "F:\lange\OT\gen\footnote\" Set MainDoc = Documents.Add 'EDIT THE FILE EXTENSION IF NECESSARY. 'If you are combining HTML files, change rtf extension to .htm or .html strFile = Dir$(strFolder & "*.rtf") Do Until strFile = "" Set rng = MainDoc.Range rng.Collapse wdCollapseEnd rng.InsertFile strFolder & strFile strFile = Dir$() Loop End Sub
Combining many html, rtf, doc, txt, or even word perfect files
Started by Josh Bond, Jan 07 2012 10:22 PM
5 replies to this topic
#1
Posted 07 January 2012 - 10:22 PM
This Microsoft Word macro will combine all files in a folder. Doesn't matter if you have 5 files or 500. It works on HTML files, RTF, DOC, DOCX, plain text files, and even wordperfect and open office files. I'm using this to combine dozens of RTF files together at once without manually opening each one and copying it.
#2
Posted 07 January 2012 - 10:49 PM
What about pdf files? Another question is this: will it place the files in a specific order? Or just however it wants?
Brad
Brad
#3
Posted 07 January 2012 - 10:52 PM
It combines alphanumerically/alphabetically. It won't combine PDF's.
#4
Posted 07 January 2012 - 11:09 PM
ok. so, it'll combine all the html files together...as an html file? Or as a rtf/docx file?
Brad
Brad
#5
Posted 07 January 2012 - 11:34 PM
It combines all the files into a live Word document that's not anything until you save it. You save it as...a PDF, a docx, txt, rtf, html, all the save as options.
#6
Posted 08 January 2012 - 03:43 PM
Thanks for posting this. I just used it and it helped save at least 15-20 minutes of copy/paste and formatting with each file.
Brad
Brad
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users
Tweets by @biblesupport
Similar Topics
My installed Bible files do not show up in my e-Sword folderStarted by Guest_Bim Kadosh_* , 04 Apr 2024 |
bblx filesStarted by Guest_sparkydan1941_* , 03 Apr 2018 |
Suggest files to be FeaturedStarted by Guest_Josh Bond_* , 17 Aug 2011 |
Copy and Paste into Word including text formatting.Started by Guest_elkillian_* , 30 Sep 2022 |
Convert BBLX to .rtf, .html, .txt, mobi, .doc/.docx ? for Kindle?Started by Guest_ChrisandTre_* , 17 Jan 2013 |
Frequently Asked Questions
Latest Blogs
- 10 justifications for Bible reading
by SarahSherrill, Jun 27 2022 02:53 AM
According to the experts from Astros DigitalHere are ten reaso... - How can I fix the Cash App if it isn't Working?
by cashcardhelps, Jun 07 2022 01:12 AM
First, you must keep the app up to date with the most recent v... - How can an app benefit your pharmacy in growing business earnings
by Alteza, Jun 06 2022 03:14 AM
Apps comprise a large portion of the tech-driven society that... - What Is a Satire Essay Anyway?
by Caleb9, Jun 04 2022 08:22 AM
What Is a Satire Essay Anyway?A large number of professional w... - 25% OFF on Mauli Thread Rakhi Online for Brother
by giftsvalla, Jun 03 2022 02:02 AM
Mauli Rakhi are generally red. The red colour symbolizes stren...