M
Michael
Hi all -
I need a macro to merge hundreds of word documents into one large file.
Each document contains a unique header that has critical information. I have
some code that will merge the docs, but it puts the same header on every
single page. It is possible to do this since the info is stored in the
header? I appreciate any suggestions!
code i'm using:
dim Rng as Range
dim Doc as Document
dim strFile as String
dim strPath as String
set strPath = "c:\folder\"
set Doc = Documents.Add
set strFile = dir(strPath)
do until strFile = ""
set Rng = Doc.Range
rng.Collapse wdCollapseEnd
rng.InserFile strPath & strFile
strFile = dir()
Loop
I need a macro to merge hundreds of word documents into one large file.
Each document contains a unique header that has critical information. I have
some code that will merge the docs, but it puts the same header on every
single page. It is possible to do this since the info is stored in the
header? I appreciate any suggestions!
code i'm using:
dim Rng as Range
dim Doc as Document
dim strFile as String
dim strPath as String
set strPath = "c:\folder\"
set Doc = Documents.Add
set strFile = dir(strPath)
do until strFile = ""
set Rng = Doc.Range
rng.Collapse wdCollapseEnd
rng.InserFile strPath & strFile
strFile = dir()
Loop