A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Append two documents to one, how



 
 
Thread Tools Display Modes
  #1  
Old August 24th, 2005, 06:36 PM
Stan Brown
external usenet poster
 
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  
Old August 24th, 2005, 09:36 PM
Doug Robbins
external usenet poster
 
Posts: n/a
Default Append two documents to one, how

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  
Old August 26th, 2005, 04:47 PM
Stan Brown
external usenet poster
 
Posts: n/a
Default Append two documents to one, how

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."
  #4  
Old August 26th, 2005, 04:49 PM
Stan Brown
external usenet poster
 
Posts: n/a
Default Append two documents to one, how

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  
Old August 26th, 2005, 06:01 PM
Daiya Mitchell
external usenet poster
 
Posts: n/a
Default Append two documents to one, how


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

  #6  
Old August 27th, 2005, 06:41 AM
Stan Brown
external usenet poster
 
Posts: n/a
Default Append two documents to one, how

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."
  #7  
Old August 27th, 2005, 06:48 AM
Doug Robbins
external usenet poster
 
Posts: n/a
Default Append two documents to one, how

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."



  #8  
Old August 27th, 2005, 01:14 PM
JoAnn Paules [MSFT MVP]
external usenet poster
 
Posts: n/a
Default Append two documents to one, how

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."



  #9  
Old August 27th, 2005, 03:33 PM
Daiya Mitchell
external usenet poster
 
Posts: n/a
Default Append two documents to one, how

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/

  #10  
Old August 28th, 2005, 12:45 AM
JoAnn Paules [MSFT MVP]
external usenet poster
 
Posts: n/a
Default Append two documents to one, how

My head is gonna explode. First Graham agreed with me, now you. Dang! I must
be better than I thought. :-)

--

JoAnn Paules
MVP Microsoft [Publisher]



"Daiya Mitchell" wrote in message
.. .
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/



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Append query - only want to append new records Mandi Running & Setting Up Queries 2 February 24th, 2005 08:06 PM
Boiletplates from Word Perfect linda General Discussion 1 January 28th, 2005 05:37 PM
Importing sub documents with AddFromFile is creating multiple styles Doug Martin via OfficeKB.com Formatting Long Documents 0 January 26th, 2005 09:54 PM
Office 2003 renames "My Documents" to username's Documents, why? Terry Setup, Installing & Configuration 4 June 17th, 2004 09:44 PM
Two versions again-language issue Otto Setup, Installing & Configuration 3 May 28th, 2004 04:57 AM


All times are GMT +1. The time now is 07:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.