PDA

View Full Version : split pages with specific number



judevino
02-26-2012, 12:41 PM
hi,

i everyday get a document which has a lot of loan nos.
this documents have to separated into several other word documents according to the nos and renaming them as the loan no it self

if this can be done it will make my life much easier

looking forward to ur replies

thanx

fumei
02-26-2012, 05:17 PM
You are going to have to give much better details than that, including what you have done for yourself so far. Have you done anything at all?

judevino
02-27-2012, 02:37 PM
well i aint that much of a expert in all of the vba codes
i jus record my macros to meet what i need
but this is jus one hell of a task and i have to do my usual work side by side

hmm now details of what i want exactly require
well lets say like i have a 100 page document in word
now the task is that they have to be broken down into several other documents depending on their specific numbers
sometimes there are like 5-6 pages for the same number
now wat i want is that
the macro should do i find search for the nos and which ever page that no exists copy the entire page/pages and create a new doc and save it
i need kind of a loop where ill b able to put several nos at a time and let the macro do d scan and create all various docs for all different nos
and rename the new doc with the same specified no

can this happen???
is it possible???

Frosty
02-27-2012, 03:06 PM
It is really really difficult to identify "pages" in Microsoft Word. An over-simple explanation of the "number of pages" in a document is to say that the number of pages is based on the printer Word thinks you will use to print the document.

This is a long discussion and covered in many threads about people asking how to break apart a single document into multiple documents, based on page numbers. Most of those threads have many many responses, as various people try to get the information needed to help you solve this problem.

For instance, your 100 page document may be 101 pages if your print to PDF, but it might be 99 pages if you print to printer X with print driver Y. Obviously any macro where you "hard code" page number values is going to break (and becomes very difficult to test, since my printer may think your 100 page document is 99 pages).

So while the user interface of "print pages 5-10" is fairly easy to access, writing a macro which breaks apart a document based on that same criteria will break in a number of different scenarios.

That's why Fumei is saying you need to be a lot more specific. Because the real answer to your question always requires you answering how your document is set up. Page numbers are meaningless data... as is "entire page" -- because that is an always changing target.

So-- yes, it can happen.
Yes, it is possible.

But you will need to give a best effort at how you would first tackle this problem in your environment (if you record a macro to do the first part, that's fine-- just try to do some modicum of clean up on it before asking people to read it and try to help you for free), as well as a sample document you would want to run this macro on (no sensitive data please).

So... can you help us help you by doing some preliminary work (now that you know it is possible, but it is very hard)?

Very very specifically-- how do you currently do this process? Forget the theory of it. What steps do you perform from the moment you open the document to the time you save your first new document, based on some part of that original document?

fumei
02-27-2012, 09:52 PM
Just to give you some ideas on how to proceed...

First off, you need to CLEARLY determine how to define these numbers: where they are, what defines the start if them, and what defines the end. Remember unless you have done something special, Word will NOT recognize them as anything important. Word does not know they are loan numbers. YOU have to define what they are...and how to find them.

For example, you state 5 or 6 pages. OK, but WHAT defines whether it is 5 or 6 (or 7) pages? Mostly likely it the fact of the next loan number. but again Word does not know they are loan numbers so YOU have state - clearly - THIS is the range to get, by defining this range of text is the next loan number.

judevino
02-28-2012, 03:10 PM
ok cool i understand what ul mean to say
so if i find a way to determine the number of pages this shld work?
if not on word then can this happen on a adobe reader??
coz ultimately we require them in a pdf format
and i guess pdf pages will be the same no matter wat
and i evn dont require to print them i jus need them separated

anyways how do i determine the no of pages?
ok fine lemme tell ul dat ill already have the numbers ready for wat the doc has come

also the docs are being in a particular format itself
so the place where the loan no. is situated will always be the same
will this help word find the no and recognize this doc

currently we jus do it manually
and seriously it just wastes a lot of time
like this doc is there so just scroll through pages and copy the required stuff

if it helps all the loan nos are being in an order only
it wont be scattered in the entire doc

if required i can show a sample doc!!

thanx

Frosty
02-28-2012, 03:47 PM
Yes, a sample document would probably help.

fumei
02-28-2012, 10:53 PM
I realize that English is likely not your first language, but could you please try and use full words. Things like "ok fine lemme tell ul dat ill " are rather annoying. It makes me reluctant to answer. It makes it hard to take you seriously. Language and words (and how one uses them) DOES matter.

judevino
02-29-2012, 02:34 PM
im sorry i dint know that
its just that when i start chatting this sms language just comes out on its own
and i cant find any link to attach this doc that i have
can i mail this to ur i.d. or something?

Frosty
02-29-2012, 03:49 PM
I think you need 5 posts to be able to attach a file.

fumei
02-29-2012, 04:50 PM
"im sorry i dint know that
its just that when i start chatting this sms language just comes out on its own"

Out on its own? I am sceptical.

judevino
03-02-2012, 02:20 PM
well this is my 5th post so lets see after this if its letting me attach a file

judevino
03-02-2012, 02:23 PM
here is the attachment :)

gmaxey
03-02-2012, 02:50 PM
You might be able to use this: gregmaxey.mvps.org/word_tip_pages/document_splitter.html

... using "LOAN #" and the userdefined delimiter.

judevino
03-04-2012, 01:54 AM
hi greg
the macro u have provided me is good
but its not exactly how i want it
its spliting the entire document after the loan #
i want i to pick up the whole page if the no exists in it

for e.g. if i say this no "221512366" in the sample doc it shold pick up all the pages collate them and create a new doc with the name "221512366"