Bobeo
asked on
Combining Word documents with different margins, headers and footers etc into 1 document
Hi guys,
I'm having some trouble combining Word documents. I know there are a lot of solutions around for combining documents, but mine contain different margins, headers and footers and general page setups.
If anyone has any ideas as to how to combine lots of very differently formatted docs into 1 master document that'd be great!
Cheers,
Bob
I'm having some trouble combining Word documents. I know there are a lot of solutions around for combining documents, but mine contain different margins, headers and footers and general page setups.
If anyone has any ideas as to how to combine lots of very differently formatted docs into 1 master document that'd be great!
Cheers,
Bob
ASKER
Hey Tinawin,
I personally am using 2007, but the process will be used by the public so it needs to work on anything from 2000 and above really.
I was aware of the section break method, but can't find a way to automate the process of taking the margins and headers from each file and applying them to the master one.
I personally am using 2007, but the process will be used by the public so it needs to work on anything from 2000 and above really.
I was aware of the section break method, but can't find a way to automate the process of taking the margins and headers from each file and applying them to the master one.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also use the clipboard. It's not neat, but it works. Below is a macro which will use the clipboard to paste a second document below the first.
Public Sub MergeDocs(ByVal ATargetDocument As Document, ByVal ASoureDocument As Document)
Dim r As Range
Set r = ATargetDocument.Range
r.Collapse wdCollapseEnd
ATargetDocument.Sections.Add r, WdSectionStart.wdSectionNewPage
ASoureDocument.Range.Copy
Set r = ATargetDocument.Range
r.Collapse wdCollapseEnd
r.Paste
End Sub
ASKER
Sorry! Been away on holiday.
Tinawin, your answer nailed it for me! Cheers!
Tinawin, your answer nailed it for me! Cheers!
What version of Word are you using. Do you know that Word uses section breaks so that margins, header and footer can be different in each section?