View Full Version : Solved: Interleave two documents
XL_Novice
08-23-2010, 04:17 AM
Hi everyone,
here is an interesting poser for the "guru's" on VBAX.
I would like to merge two documents in a very specific way and to try and clarify things, here is an example.
I have document ONE.doc and document TWO.doc
Both these documents consist of 100 pages, each.
I would like to merge/combine/interleave these two documents in this manner;
ONE.doc page 1
TWO.doc page 100
ONE.doc page 2
TWO.doc page 99
ONE.doc page 3
TWO.doc page 98
.
.
.
.
ONE.doc page 100
TWO.doc page 1
My sadly poor knowledge of VBA doesn't begin to give me a starting point.:banghead:
Any help would be much appreciated.
Sandy
fumei
08-25-2010, 06:02 PM
While I would not say this is impossible, it would be very difficult, for a simple reason.
Word does not really understand "page" the way we humans do.
Each and every single page would have to be independently determined.
Plus you have not been specific enough.
Is this a completely NEW document?
Is this Doc_1 with inserted "pages" from Doc_2?
Is this Doc_2 with inserted "pages" from Doc_1?
I have to ask...WHY do you want to do this????
XL_Novice
08-26-2010, 04:25 AM
While I would not say this is impossible, it would be very difficult, for a simple reason.
Word does not really understand "page" the way we humans do.
Each and every single page would have to be independently determined.
Plus you have not been specific enough.
Is this a completely NEW document?
Is this Doc_1 with inserted "pages" from Doc_2?
Is this Doc_2 with inserted "pages" from Doc_1?
I have to ask...WHY do you want to do this????
Hi Gerry,
thanks for the reply.
I was beginning to think it was impossible and you have pretty much confirmed this.
As to your questions;
1) it should generate a Doc 3 with both One.doc and Two.doc combined as indicated.
2) the reason will appear strange and I DO EXPECT the usual, "turn the pages round in the printer" response. Believe me I've tried it and the least misfeed of a page can ruin hours of preparation.
The reason is that I run a Karaoke and I have a song book sorted in SONG order and another sorted by ARTIST.
However, I saw a neat song book (only 20 pages long) idea where the book had been generated by printing the SONG sorted pages and the ARTIST sorted pages, then turning the ARTIST pages upside down and sleeving the pages together so that you could look through the book one way for songs or "flip" the book over and refer by artist.
Neat system and suited everybody.
However, my songbook runs to 400 pages, so when printing the "back side" of each, ANY misfeed in the middle of the print run would be disasterous.
I actually wonder if this might be better in Adobe Acrobat as I believe it might be possible to rotate individual pages.
I DO appreciate there is a mechanical way to do it but I hoped this would be a mental challenge for the "Guru's" on VBAX.
Seems a shame that VBA for Word doesn't seem to have the out and out power that VBA for Excel has??? I mean, how useful would being able to simply select a page be?
Sandy
Tinbendr
08-26-2010, 05:30 AM
While it is possible to do this, I'm with Gerry... It's a lot of work.
As far as 'turning the pages around in the printer' goes, print out one good copy of each. Take them to a copy store and tell THEM to alternate the pages for you.
But the problem with this is that after a year, the catalog is out of date.
I would invest in a PDA and store the info on there. Maybe a Pocket PC based cell phone. They have a Pocket PC Excel version that you could have a list and reorder it how you like. Or invest in a laptop karaoke machine.
XL_Novice
08-26-2010, 06:52 AM
While it is possible to do this, I'm with Gerry... It's a lot of work.
As far as 'turning the pages around in the printer' goes, print out one good copy of each. Take them to a copy store and tell THEM to alternate the pages for you.
But the problem with this is that after a year, the catalog is out of date.
I would invest in a PDA and store the info on there. Maybe a Pocket PC based cell phone. They have a Pocket PC Excel version that you could have a list and reorder it how you like. Or invest in a laptop karaoke machine.
Actually, the songbook is pretty much out of date the month after it's printed as new discs are purchased.
To be honest, getting books printed at a Pro Printer's has always been my preferred method but I'm trying to sort something out for another KJ couple that aren't as up on PC stuff as wot I am:p
I DO have my songbook on a PDA and on my laptop but unfortunately, most punters prefer to be able to pore through a printed book, spill drinks on it and otherwise abuse it, before they sing the same old song they always sing, anyway:banghead:
Thanks for the help but as this seems to be heading for a dead end, I'll mark it as "Solved" to stop anyone else wasting time on it.
Sandy
Paul_Hossler
08-26-2010, 03:48 PM
You might check out MS Publisher. I've only used it a little bit, but it can do booklet type printing, and there might be an option that meets your needs.
Paul
XL_Novice
08-27-2010, 02:45 AM
You might check out MS Publisher. I've only used it a little bit, but it can do booklet type printing, and there might be an option that meets your needs.
Paul
Hi Paul,
I have thought about Publisher but I don't know how it reacts to simple text and whether it will rotate the alternate pages, as I require.
I'll have a look at the weekend and see what it can do.
Thanks for the advice,
Sandy
fumei
08-30-2010, 10:10 AM
"Seems a shame that VBA for Word doesn't seem to have the out and out power that VBA for Excel has??? I mean, how useful would being able to simply select a page be?"
I have to disagree. I think Word VBA is extremely powerful. The problem is your understanding of the object model. Word does not have a defined page. It calculates pages every time. This is because Word defines EVERYTHING ("page" wise) by what it gets back from the printer driver.
In other words, what is a "page" on one computer may not be the same "page" on another computer. Heck, even the same computer if you change printer (and thus printer driver).
Can you select each page? Yes. However, selecting is a very inefficient way of doing things. Plus, you did not originally mention this flipping issue.
Yikes. Again, while I do not think it is impossible, it is most unlikely that it is worth the effort.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.