Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-28-2018, 05:57 PM
salimnore salimnore is offline combine 2 different word documents Windows 7 32bit combine 2 different word documents Office 2007
Novice
combine 2 different word documents
 
Join Date: May 2018
Posts: 8
salimnore is on a distinguished road
Default combine 2 different word documents

Dear All,

Thank you for taking the time to read my post, I have a quick question and was wondering if anyone on this forum can help me,

I have 2 separate word documents, I've labelled one odd as it contains the text page 1, 3 and 5, and the other document as even as it contains page 2, 4 and 6.

My question is there a way to get word to combine these in order so it follows as this is page 1,2,3,4,5 and 6.
I've called the final document proper way as this is how I want it joined together. Maybe a vba option might be needed, but thought I'd try this first?

BTW both "odd" and "even" documents will have the same number of pages

Thanks once again for taking the time to read my thread.

Salim
Attached Files
File Type: docx odd pages.docx (11.7 KB, 11 views)
File Type: docx even pages.docx (11.7 KB, 8 views)
File Type: docx proper way.docx (11.9 KB, 6 views)
Reply With Quote
  #2  
Old 05-28-2018, 06:29 PM
macropod's Avatar
macropod macropod is offline combine 2 different word documents Windows 7 64bit combine 2 different word documents Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Unless your pages are separated by manual page breaks or 'next page' Section breaks, there is no reliable way of doing this with VBA. That's because where a page starts & ends depends on the layout optimisations Word does for the active printer driver.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-28-2018, 06:34 PM
salimnore salimnore is offline combine 2 different word documents Windows 7 32bit combine 2 different word documents Office 2007
Novice
combine 2 different word documents
 
Join Date: May 2018
Posts: 8
salimnore is on a distinguished road
Default

Thank you sir for your feedback,
If you manage to find a solution to this problem i would be very grateful. I guess inserting manual page breaks or next page section breaks may be the only way.

Thank you for your time.
Reply With Quote
  #4  
Old 05-28-2018, 06:49 PM
Charles Kenyon Charles Kenyon is offline combine 2 different word documents Windows 10 combine 2 different word documents Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

There is no solution because of both the nature of Word and the unusual nature of your need.


I am curious. Why do you want to do this. It seems unnecessarily complex.
Reply With Quote
  #5  
Old 05-28-2018, 07:00 PM
salimnore salimnore is offline combine 2 different word documents Windows 7 32bit combine 2 different word documents Office 2007
Novice
combine 2 different word documents
 
Join Date: May 2018
Posts: 8
salimnore is on a distinguished road
Default

Hi Charles,

My intention in the long term is to merge some excel charts into a word document, and have these back to back on an A4 sheet of paper. I'm still looking into this matter and came up with this idea as i painstakingly found a way of creating my Excel charts in word by paste linking each sheet and making this into a word document. I therefore just need a way now to combine my report to the excel sheets.

Weird i know, but its something i thought of as a spur of the moment thing, any help would be greatly appreciated.
Reply With Quote
  #6  
Old 05-28-2018, 08:21 PM
macropod's Avatar
macropod macropod is offline combine 2 different word documents Windows 7 64bit combine 2 different word documents Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

if you add the following macro to the documents whose content you want to insert the charts after, then run the macro and select the charts document, it should insert the charts into the document you're running the macro from. As I indicated, though, you're liable to get different results if you run the macro on a different computer.
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim DocSrc As Document, DocTgt As Document
Dim i As Long, RngSrc As Range, RngTgt As Range
Set DocTgt = ActiveDocument
With Application.FileDialog(FileDialogType:=msoFileDialogFilePicker)
  .Title = "Select the source file"
  .AllowMultiSelect = False
  If .Show = -1 Then
    Set DocSrc = Documents.Open(.SelectedItems(1), ReadOnly:=True, AddToRecentFiles:=False)
  Else
    MsgBox "No source file selected. Exiting", vbExclamation
    Exit Sub
  End If
End With
With DocSrc
  For i = .ComputeStatistics(wdStatisticPages) To 1 Step -1
    Set RngSrc = .Range.GoTo(What:=wdGoToPage, Name:=i)
    Set RngSrc = RngSrc.GoTo(What:=wdGoToBookmark, Name:="\page")
    Set RngTgt = DocTgt.Range.GoTo(What:=wdGoToPage, Name:=i)
    Set RngTgt = RngTgt.GoTo(What:=wdGoToBookmark, Name:="\page")
    RngTgt.Characters.Last.FormattedText = RngSrc.FormattedText
  Next
  .Close SaveChanges:=False
End With
ErrExit:
Set RngSrc = Nothing: Set RngTgt = Nothing
Set DocSrc = Nothing: Set DocTgt = Nothing
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 05-29-2018, 09:43 AM
salimnore salimnore is offline combine 2 different word documents Windows 7 32bit combine 2 different word documents Office 2007
Novice
combine 2 different word documents
 
Join Date: May 2018
Posts: 8
salimnore is on a distinguished road
Default

Thank you sir.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
combine 2 different word documents Combine documents makes duplicate word vincelge Word 2 05-15-2017 05:47 AM
After Mail merging single documents - how to combine several documents into one? Abacus1234 Mail Merge 16 06-25-2015 06:56 AM
combine multiple documents word starter 2010 bribelge Word 3 12-19-2012 09:25 AM
combine 2 different word documents OK I know its a dumb question but how can I combine word documents? hellno187 Word 2 12-16-2012 12:32 PM
How can a combine three seperate word documents into one? hellno187 Word 0 09-20-2010 02:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:48 AM.


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