Background pagination in Word

Solved
RideauBlanc Posted messages 29 Status Membre -  
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   -
Hello,

In a macro that formats the layout, background repagination is slowing down the process. I tried to disable it and work in draft mode, but the document still repaginates.
I tried codes in the macro and in the Do… Loop While loops:
Options.Pagination = False
IsBackgroundPaginationEnabled = False

Nothing worked. Do you have any suggestions for a solution?

Thank you.

Configuration: Windows / Chrome 96.0.4664.45

7 réponses

yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   Ambassadeur 1 588
 
Hello,
what did your tests yield?
Error messages, or nothing conclusive?
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   Ambassadeur 1 588
 
Before automating the background pagination stop, have you tested this manually?
This might allow you to better understand how it works and also check if it has the desired effect in terms of performance.
Then, you could use the macro recorder to confirm how to change this option in VBA.
0
RideauBlanc Posted messages 29 Status Membre 2
 
Thank you yg_be

Indeed, I tested manually, recorded a macro and looked for an alternative code (IsBackgroundPaginationEnabled = False).

What I've read tells me that repagination should be stopped; however, it restarts during the execution of the macro whether in draft (normal) mode or page mode. There are no error messages during the process; it just takes a long time for a 260-page document. When I use a 100-page document, it's almost instantaneous. My documents range from 50 to 500 pages.

The macro adds a return before each title (this step is quick and works well regardless of the document size). Then, it goes through each page and ensures that there isn't a lone title at the bottom of a page by adding a return when that's the case, and makes sure that there are no empty lines at the beginning of a page (this part is lagging). I can't use linked paragraphs because the lines are numbered. The document requires 25 lines per page.

Thank you.
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 588
 
And if you don't take care of pagination in the macro and you disable it manually before running the macro, does it reactivate during the execution of the macro?

Wouldn't the macro automatically switch back to page mode? Isn't it necessary to work page by page?

Have you tried to do by hand what the macro does (using shortcuts) to check if the non-pagination option remained active?

For the titles, wouldn't it be better to use styles (or paragraph options) to prevent them from being left alone at the end of the page?
0
RideauBlanc Posted messages 29 Status Membre 2
 
And if you don't manage pagination in the macro and you disable it manually before running the macro, does it reactivate during the macro execution? Yes, actually, I feel like the checkbox "disable background repagination" serves no purpose.

Wouldn't the macro automatically switch back to page mode? Isn't it necessary to work page by page? I've removed everything that could switch it back to page mode for testing. I ran it in draft mode and it reactivated. Obviously, the result is not good, but it was for testing purposes.

Have you tried doing manually what the macro does (in shortcut), to check if the non-pagination option remained active? Actually, I'm not fast enough for repagination to cause an issue :-) Go to line 25 of each page, check if there's a title, insert a return before in text style. Go to line 1 of the next page and ensure that the first line is not empty.

For the titles, wouldn't it be better to use styles (or paragraph options) to avoid them being alone at the bottom of the page? I would have liked to, but given that the lines are numbered and each page must have 25 lines, when I use "linked paragraphs" to move the title to the next page, only 24 lines are left on the page. I would also have liked to use paragraph spacing rather than returns, but the problem is the same.

Thank you, you're making me think :-)
Maybe there's another angle of attack.
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 588
 
To me, actions can only be taken in page mode, not in draft mode.

And it is only possible, I think, to disable automatic pagination in draft mode.

So, for me, the very idea of disabling automatic pagination while wanting to work on pages makes no sense.

It seems to me that it is only possible to disable pagination as long as we remain in draft mode, and that makes sense, since in this mode pagination is not visible or usable, and therefore it is not essential for this pagination to be correct.

Perhaps I misunderstood.
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 588
 
If the lines are numbered, is it necessary for the macro to work on the pages?
Couldn't the macro work on the lines or paragraphs instead? Maybe it could do this in draft mode, which would help preserve the non-repagination?

I'm also wondering if Word is the right tool for working on this text.
You're not providing enough information for us to make suggestions.
0
RideauBlanc Posted messages 29 Status Membre 2
 
Thank you, I believe you are right, my tests confirm that I am unable to deactivate it in any context.

I am exploring another approach; I have inserted ß (a strange character) in a paragraph before each title.
and I would like my macro to check if line 24 = ß, then a paragraph should be added, and if line 1 = ß, then this paragraph should be removed. Perhaps this method would take less time. Then a simple find and replace would do the trick.

I am currently looking at the syntax for all this. With a Dim? What do you think?

Finally, I thank you for the time you have given me and wish you a good day.
0
RideauBlanc Posted messages 29 Status Membre 2
 
In draft mode, it does not recognize line numbers.

If "repagination" means: restoring page breaks according to the changes made upstream, then I was indeed very mistaken and I won’t be able to do better than 6 minutes for the formatting of 260 pages.

I was afraid of bothering you with the details.
Just to give you a little background:
These are transcriptions (verbatim) that professionals need to type from a recording. These ladies are incredibly efficient at typing text, but when it comes to formatting, they feel overwhelmed and fumble around. I don’t want them to waste time on formatting. I provide them with complete templates with styles, headers, and footers... refstyle fields for the information to be repeated... Once the document is finished, it goes to the proofreaders, and then it’s the final formatting, and that’s when, in some cases, the editor has to add returns before the titles. The template is very stable and adheres to the rules of the craft. I cannot ask these ladies to change software. In reality, the majority work from WordPerfect templates that I created a few years ago. The Word templates will be for the new generation of typists.

Thank you again.
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 588
 
What other meaning could "repagination" have?
I don't think I have understood this idea of "line number."
"I cannot use binding paragraphs because the lines are numbered."
"In draft mode, it does not recognize line numbers."

Why is it important to have 25 lines per page? In what way is it a problem to have 24 lines and then a page break?

I wonder if the weight of history is starting to hinder evolution.
0
RideauBlanc Posted messages 29 Status Membre 2
 
You are right, these are legal documents with the constraint of 25 lines per page, and yes, the history is terribly constraining. For everything that happens after the layout... because there are indeed many other things afterward, I wanted to avoid page breaks. I am exploring and thinking about something else. Thank you. Have a good evening or good night depending on your time zone :-)
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 588
 
what reassures me that these office tools are not suitable.
0