Reply
 
Thread Tools Display Modes
  #1   Report Post  
Stan Brown
 
Posts: n/a
Default Append two documents to one, how

I've got a series of exams and solution sets. When I first made them
up, it seemed easy to have the exam and solutions as separate
documents; but for archiving I think I'd rather have the solutions
and exam in the same document (with an "odd page" section break
between them).

How do I append the solutions document to the exam document without
screwing up the formatting of either one? I know that I'll have to
fix the "page N of NN" in the headers to reference the number of
pages within section, but is there anything else to watch out for?

(Seems to me there was a reference in the group to a document about
this. I've just spent some time at
http://word.mvps.org/Search/index.htm but searches for "join
documents" and "append documents" didn't turn up anything.)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"My theory was a perfectly good one. The facts were misleading."
-- /The Lady Vanishes/ (1938)
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

Here's a macro that I created for another poster who wanted to create a
document by combining alternate pages from two other documents. It might do
what you want:

Dim sourcea As Document, sourceb As Document, target As Document, Pages
As Integer, Counter As Integer, targetrange As Range 'targetrange added

Dim evenpage As Range

Set sourcea = Documents.Open(FileName:="...")

sourcea.Repaginate

Pages = ActiveDocument.BuiltInDocumentProperties(wdPropert yPages)

MsgBox Pages

Set sourceb = Documents.Open(FileName:="...")

Set target = Documents.Add

target.PageSetup.LeftMargin = sourcea.PageSetup.LeftMargin

target.PageSetup.RightMargin = sourcea.PageSetup.RightMargin

target.PageSetup.TopMargin = sourcea.PageSetup.TopMargin

target.PageSetup.BottomMargin = sourcea.PageSetup.BottomMargin

target.AcceptAllRevisions

Counter = 0

While Counter Pages

sourcea.Activate

ActiveDocument.Bookmarks("\page").Range.Copy

Set targetrange = target.Range

targetrange.Start = targetrange.End

targetrange.Paste

ActiveDocument.Bookmarks("\page").Range.Cut

sourceb.Activate 'Assumed to be the document containing the even
pages

Selection.EndKey Unit:=wdStory 'Line of code added to start from the
end of the document

ActiveDocument.Bookmarks("\page").Range.Copy

Set targetrange = target.Range

targetrange.Start = targetrange.End

targetrange.Paste

targetrange.Start = targetrange.End

targetrange.InsertBreak Type:=wdPageBreak

Set evenpage = ActiveDocument.Bookmarks("\page").Range

evenpage.Start = evenpage.Start - 1

evenpage.Delete

Counter = Counter + 1

Wend

sourcea.Close wdDoNotSaveChanges

sourceb.Close wdDoNotSaveChanges

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Stan Brown" wrote in message
...
I've got a series of exams and solution sets. When I first made them
up, it seemed easy to have the exam and solutions as separate
documents; but for archiving I think I'd rather have the solutions
and exam in the same document (with an "odd page" section break
between them).

How do I append the solutions document to the exam document without
screwing up the formatting of either one? I know that I'll have to
fix the "page N of NN" in the headers to reference the number of
pages within section, but is there anything else to watch out for?

(Seems to me there was a reference in the group to a document about
this. I've just spent some time at
http://word.mvps.org/Search/index.htm but searches for "join
documents" and "append documents" didn't turn up anything.)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"My theory was a perfectly good one. The facts were misleading."
-- /The Lady Vanishes/ (1938)



  #3   Report Post  
Stan Brown
 
Posts: n/a
Default

On Wed, 24 Aug 2005 22:36:09 +0200, "Doug Robbins"
wrote:


"Stan Brown" wrote in message
.. .

How do I append the solutions document to the exam document without
screwing up the formatting of either one? I know that I'll have to
fix the "page N of NN" in the headers to reference the number of
pages within section, but is there anything else to watch out for?


Here's a macro that I created for another poster who wanted to create a
document by combining alternate pages from two other documents. It might do
what you want:


Thanks for posting, Doug. This would actually be pretty slick if the
solutions were paginated the same as the exam questions, but
unfortunately they're not.

What I'm trying to do is something less ambitions: take document B
and put it at the end of document A, then save it as C so that if I
right-click on document C and select "Print" I'll get what I
formerly got from separately printing A and B separately.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"What in heaven's name brought you to Casablanca?"
"My health. I came to Casablanca for the waters."
"The waters? What waters? We're in the desert."
  #4   Report Post  
Doug Robbins
 
Posts: n/a
Default

All you have to do is use Ctrl+a in one document to select everything, then
Ctrl+c to copy it to the clipboard, then go to the end of the other document
and use Ctrl+v to paste the information from the clipboard into that
document. Save with a different name if you need to.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Stan Brown" wrote in message
...
On Wed, 24 Aug 2005 22:36:09 +0200, "Doug Robbins"
wrote:


"Stan Brown" wrote in message
. ..

How do I append the solutions document to the exam document without
screwing up the formatting of either one? I know that I'll have to
fix the "page N of NN" in the headers to reference the number of
pages within section, but is there anything else to watch out for?


Here's a macro that I created for another poster who wanted to create a
document by combining alternate pages from two other documents. It might
do
what you want:


Thanks for posting, Doug. This would actually be pretty slick if the
solutions were paginated the same as the exam questions, but
unfortunately they're not.

What I'm trying to do is something less ambitions: take document B
and put it at the end of document A, then save it as C so that if I
right-click on document C and select "Print" I'll get what I
formerly got from separately printing A and B separately.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"What in heaven's name brought you to Casablanca?"
"My health. I came to Casablanca for the waters."
"The waters? What waters? We're in the desert."



  #5   Report Post  
Stan Brown
 
Posts: n/a
Default

On Sat, 27 Aug 2005 07:48:51 +0200, "Doug Robbins"
wrote:

All you have to do is use Ctrl+a in one document to select everything, then
Ctrl+c to copy it to the clipboard, then go to the end of the other document
and use Ctrl+v to paste the information from the clipboard into that
document.


That's if the two documents have identical styles and page setup
elements such as headers and footers.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"What in heaven's name brought you to Casablanca?"
"My health. I came to Casablanca for the waters."
"The waters? What waters? We're in the desert."
"I was misinformed."


  #6   Report Post  
Daiya Mitchell
 
Posts: n/a
Default

On 8/27/05 8:35 PM, "Stan Brown" wrote:

On Sat, 27 Aug 2005 07:48:51 +0200, "Doug Robbins"
wrote:

All you have to do is use Ctrl+a in one document to select everything, then
Ctrl+c to copy it to the clipboard, then go to the end of the other document
and use Ctrl+v to paste the information from the clipboard into that
document.


That's if the two documents have identical styles and page setup
elements such as headers and footers.


As it turns out...see Klaus Linke's second post on this thread:

http://groups.google.com/group/micro...ment/browse_fr
m/thread/2a507242995575b5/2fba9c46b1bfb4d8?lnk=raot#2fba9c46b1bfb4d8

[long URL may break]

--
Daiya Mitchell, MVP Mac/Word
Word FAQ: http://www.word.mvps.org/
MacWord Tips: http://www.word.mvps.org/MacWordNew/
What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/

  #7   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

See http://word.mvps.org/FAQs/Formatting...thSections.htm for one aspect
of the problem.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Stan Brown" wrote in message
...
I've got a series of exams and solution sets. When I first made them
up, it seemed easy to have the exam and solutions as separate
documents; but for archiving I think I'd rather have the solutions
and exam in the same document (with an "odd page" section break
between them).

How do I append the solutions document to the exam document without
screwing up the formatting of either one? I know that I'll have to
fix the "page N of NN" in the headers to reference the number of
pages within section, but is there anything else to watch out for?

(Seems to me there was a reference in the group to a document about
this. I've just spent some time at
http://word.mvps.org/Search/index.htm but searches for "join
documents" and "append documents" didn't turn up anything.)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"My theory was a perfectly good one. The facts were misleading."
-- /The Lady Vanishes/ (1938)


  #8   Report Post  
Stan Brown
 
Posts: n/a
Default

On Wed, 24 Aug 2005 17:32:31 -0500, "Suzanne S. Barnhill"
wrote:

"Stan Brown" wrote in message
.. .
I've got a series of exams and solution sets. When I first made them
up, it seemed easy to have the exam and solutions as separate
documents; but for archiving I think I'd rather have the solutions
and exam in the same document (with an "odd page" section break
between them).

How do I append the solutions document to the exam document without
screwing up the formatting of either one? I know that I'll have to
fix the "page N of NN" in the headers to reference the number of
pages within section, but is there anything else to watch out for?


See http://word.mvps.org/FAQs/Formatting...thSections.htm for one aspect
of the problem.


This was one of the documents I looked at, but frankly I didn't
understand how it relates to my problem. Maybe I'm extra stupid
today,

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"What in heaven's name brought you to Casablanca?"
"My health. I came to Casablanca for the waters."
"The waters? What waters? We're in the desert."
  #9   Report Post  
Daiya Mitchell
 
Posts: n/a
Default


How do I append the solutions document to the exam document without
screwing up the formatting of either one? I know that I'll have to
fix the "page N of NN" in the headers to reference the number of
pages within section, but is there anything else to watch out for?


See http://word.mvps.org/FAQs/Formatting...thSections.htm for one aspect
of the problem.


This was one of the documents I looked at, but frankly I didn't
understand how it relates to my problem. Maybe I'm extra stupid
today,


Sections 2 and 4 should be directly relevant, depending on the method you
choose. But this also depends on what formatting you are trying to keep.
The page is basically about keeping different headers and footers and other
section formatting properties. If you want the Body Text style to have one
appearance in the Exam section and a different appearance in the Solutions
section, no can do.

Daiya

  #10   Report Post  
Stan Brown
 
Posts: n/a
Default

On Fri, 26 Aug 2005 10:01:18 -0700, Daiya Mitchell
wrote:

Sections 2 and 4 should be directly relevant, depending on the method you
choose. But this also depends on what formatting you are trying to keep.
The page is basically about keeping different headers and footers and other
section formatting properties. If you want the Body Text style to have one
appearance in the Exam section and a different appearance in the Solutions
section, no can do.


That sounds like there's no easy way to append two documents
together without losing the styles of one of them. (Obviously I
could rename all the styles of one, but that's not exactly easy. :-)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"What in heaven's name brought you to Casablanca?"
"My health. I came to Casablanca for the waters."
"The waters? What waters? We're in the desert."
"I was misinformed."


  #11   Report Post  
JoAnn Paules [MSFT MVP]
 
Posts: n/a
Default

There is one way - turn them into .pdfs and combine them into one document.
I do that often.

--

JoAnn Paules
MVP Microsoft [Publisher]



"Stan Brown" wrote in message
...
On Fri, 26 Aug 2005 10:01:18 -0700, Daiya Mitchell
wrote:

Sections 2 and 4 should be directly relevant, depending on the method you
choose. But this also depends on what formatting you are trying to keep.
The page is basically about keeping different headers and footers and
other
section formatting properties. If you want the Body Text style to have
one
appearance in the Exam section and a different appearance in the Solutions
section, no can do.


That sounds like there's no easy way to append two documents
together without losing the styles of one of them. (Obviously I
could rename all the styles of one, but that's not exactly easy. :-)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"What in heaven's name brought you to Casablanca?"
"My health. I came to Casablanca for the waters."
"The waters? What waters? We're in the desert."
"I was misinformed."



  #12   Report Post  
Daiya Mitchell
 
Posts: n/a
Default

If you want the Body Text style to have one
appearance in the Exam section and a different appearance in the Solutions
section, no can do.


That sounds like there's no easy way to append two documents
together without losing the styles of one of them. (Obviously I
could rename all the styles of one, but that's not exactly easy. :-)


Well, the point of using styles is consistency throughout a document, so no,
there's no "per section" setting for styles. Try JoAnn's PDF method.

--
Daiya Mitchell, MVP Mac/Word
Word FAQ: http://www.word.mvps.org/
MacWord Tips: http://www.word.mvps.org/MacWordNew/
What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Master/Outline documents of substantial length PopS Formatting Long Documents 7 September 13th 05 01:17 AM
print multiple documents or merge multiple documents into one EE in Need Microsoft Word Help 3 July 16th 05 12:38 AM
Problems merging multiple Word documents Tevibear Microsoft Word Help 2 June 26th 05 12:27 AM
Wordperfect Office 2000 conversion to Word 2003 MikeE New Users 1 March 21st 05 12:04 AM
Boiletplates from Word Perfect linda Microsoft Word Help 1 January 28th 05 05:37 PM


All times are GMT +1. The time now is 02:26 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"