PDA

View Full Version : Create a List of Effect Pages (LEP)



boneKrusher
01-13-2008, 08:26 AM
Hi,

Does anyone know how to create a List of effect pages (LEP) in word (VBA).

I am using word 2003 or 2007.

A LEP is a table that list each page number and a revision date or number.

Any help would be great.

Thanks,

Bones

fumei
01-14-2008, 11:28 AM
I think you need to spec that out a bit more.

boneKrusher
01-15-2008, 07:13 AM
Hi,

Ok I will try to explain. I am looking for a script to list in a table the following:

Page | Revision Date | Revision Number
1 | 7/25/2007 | 01
2 | 1/15/2008 | 02
3 | 1/15/2008 | 02
There is a unique revision date and revision number for each page in the footer of my document.

Is there a way to do auto generate this?

fumei
01-15-2008, 02:50 PM
"There is a unique revision date and revision number for each page in the footer of my document. "

OK. It is critically important to know how those got there.

1. for each page to be unique in the footer, each page has to be a unique footer. The ONLY way to do that is have ONLY three pages per Section with DifferentFirstPage and DifferentOddEven; OR separate Sections for each page.

2. Are the revision date and revision number in the footers are fields?

boneKrusher
01-16-2008, 03:03 PM
Hi,

Thank you for your reply.

Currently each page is its own section break which has the header and footer belonging to only that page.

The Revision Date and Revision number are put in a text manually.

The good thing is that I can set up the document anyway you recommend as we are in the begining of the project.

Thanks for the help.

Bones.

fumei
01-17-2008, 02:50 PM
"The Revision Date and Revision number are put in a text manually."

Hmmmm.

First off, this seems very odd to me, having unique revision numbers per page, but whatever.

If true that you have each page in its own Section, that makes things easier to an extent. You simply grab the content of each footer and dump into your table. But...you have to tell me, precisely, exactly, what the footer content looks like.

Is it:

1 | 7/25/2007 | 01
2 | 1/15/2008 | 02
3 | 1/15/2008 | 02

Is it:

Page 1 | Date: 7/25/2007 | Revision Number 01
Page 2 | Date: 1/15/2008 | Revision Number 02
Page 3 | Date: 1/15/2008 | Revision Number 02

Is it:

Page 1 Date: 7/25/2007 Revision Number 01
Page 2 Date: 1/15/2008 Revision Number 02
Page 3 Date: 1/15/2008 Revision Number 02

without the pipes?

Is it:

1 Date: 7/25/2007 Revision Number 01
2 Date: 1/15/2008 Revision Number 02
3 Date: 1/15/2008 Revision Number 02

Are these values in cells of a table in the footer? It would make it easier if they were. Oh and how, exactly, are you getting the page number?

boneKrusher
01-19-2008, 01:27 PM
Hi, Thanks for the help. Here is the footer:

1 | 7/25/2007 | REV 01
2 | 1/15/2008 | REV 02
3 | 1/15/2008 | REV 02


And they are in a table

Also, you wrote:
" First off, this seems very odd to me, having unique revision numbers per page, but whatever."

In aviation we revise books (print on paper) and they are distributed to employees. If the book is 500 pages and we revise only 25 pages, we write the revision date and number on the pages. The employee updates thier book with the 25 pages. The pages are recorded in the LEP (list of effective pages) which is a master list of what pages where revised. It sucks, but this is how the have done it for years. Most of all my books are electronic, eccept two(2).

Thanks

fumei
01-21-2008, 11:06 AM
I will try again. It is important to be very very specific.

1 | 7/25/2007 | REV 01
2 | 1/15/2008 | REV 02
3 | 1/15/2008 | REV 02

So, just to be very very clear, they are going to actually type:

1 | 7/25/2007 | REV 01

1, space, pipe symbol, space, 7, slash, 2, 5, slash, 2, 0, 0, 7, space, pipe symbol, space, R, E, V, space, 0, 1

Correct?

boneKrusher
01-21-2008, 03:54 PM
Hi, No problem

look here (http://www.aviationcontentmanagement.com/footer.htm)

Page numbers on the right are based on chapter/sec/page
Date is put in my hand
rev number is put in my hand

Its a table

column 1 - justify left

column 2 - justify center


column 3 - justify right

fumei
01-23-2008, 03:45 AM
"Page numbers on the right are based on chapter/sec/page"

What does that mean?

MOM-1 is a "chapter"/sec/page number?

It is not even a number.

Word has absolutely no concept of "chapter". "Chapter" is a writing term, a design term. "Chapter" means nothing to Word. I have no idea what you mean by "based on".

I have asked if any were fields. Does "based on" mean that it is a field? Why not just say it is a field? I still do not know if it really is a field, or not. "MOM-1" sure as heck does not look like a field, but then...I have no idea what "based on" means.

I am sure someone else can help you. But before I go, how familiar are you with using VBA? If you are, then really this is easy. Use objects. Since you have a section per page, then each page IS a Section, right? So (pseudo-code!!)....declare:

a cell object
a headerfooter object
a section object

For Each Section
For Each HeaderFooter
For Each Cell In HeaderFooter table
' grab the cell content
' dump into cell in listing table
Next
Next
' make a new row in the listing table
' go on to the next Section/Page
Next

Voila. You go through EACH Section, EACH headerfooter, and EACH cell in the table of the headerfooter. There are three cells in the table, so it grabs the three (one at a time), and dumps the content of them into your listing table.

This way, it does not matter what the content is. You simple grab the content from each cell of the table in each footer, in each section.

Good luck.

fumei
01-23-2008, 04:00 AM
PS, just to demostrate why it actually is really rather important to state clearly, exactly, explicitly, things:

You repeatedly used this kind of example:

1 | 7/25/2007 | REV 01

But your actual example is:

REV 01 7/25/2007 MOM-1

So I do not even really know if you really want it in the same order, or a different order in the listing table.

You apparently want a table with THIS order:

Page | Revision Date | Revision Number

But your actual footer appear to have THIS order:

Revision Number Revision Date Page

Not an insignificant difference. It means you have to juggle the data from the cells in the source table (in the footers) to the listing table. Something that rather should be mentioned.

I specifically asked about the pipe symbol - which of course now I know they are not. You were using them to indicate the separation between cells,

That is nice...but you did not say that. I feel I wasted time trying to find out what those symbols between them were.

As I said, as far as I can see - but I sure as heck do not really know - this should not be too difficult. I did a test document with 20 pages, using your sample footer but different data, and extracted the contents into a new table no problem.

TonyJollans
01-27-2008, 05:32 AM
Hi,

I'm just catching up and coming late to this. I haven't read all the posts fully but it seems you are not getting very far yet.

I (think I) know what you want and it isn't easy in Word. This kind of process was always a manually managed one in the days before word processors.

Making changes causes text to reflow over pages and I would expect you to address this problem by introducing extra pages (25.1 between 25 and 26, for example) where necessary to avoid page renumbering issues. Having each page in a separate section is one way to organise the document - but over time you will still end up with multi-page sections.

The only way to do this involves using Track Changes (you can compare old and new versions of the untracked document to get more or less the effect). It ought to be possible to write some VBA to examine the changes and both update the footers and produce a list of affected pages but, as I said, it isn't easy, and I don't have a lot of time to devote to this at the moment.

If you have, and will continue to, manually add (consistent) change information to footers it ought to be possible to check what you have input - as Gerry has attempted to show you - but you run the risk of inadvertently making slightly different marks that an automated process could miss.

I will see what I can manage over the next week or two but it would help if you could post a sample document.

To be perfectly honest, this kind of thing is out of date and a lot of effort to maintain. Do you really have a business case for continuing in this fashion?