Share via

Word page count changes when printing/exporting

Anonymous
2020-06-19T17:37:24+00:00

I have a 3 page Word document that prints as 2 pages. This only occurs with Word 365, not with Word 2013 or earlier

I use the Docmail printing service to print and post hard copies of letters generated in Word. This requires me to upload a document containing one or more letters and a separate address file with a list of addresses. Each address specifies the number of pages for each letter and the system uses this to splice the document into separate letters which are then printed and posted.

I use Word through automation to determine the number of pages for each letter. However under certain circumstances, Word is reporting a different number of pages to the number it generates when it exports the document to PDF.

This is not the usual case of having the wrong page size defined for the document or one of the usual problems with printer layout problems not matching the print preview. I have researched and experimented with this problem extensively. I actually believe it is a bug with Office 365.

I have tried the following:

  • Checked/changed the printer page settings. All are set to A4
  • Changed printers
  • Saving in different compatibility modes and testing each layout setting
  • Converting the document to the latest format
  • Converting to .doc format at using the printer metrics to layout the page

None of these have an effect.

I have tested the document in Word 2000, 2003, 2007, 2010 and 2013. The problem only occurs with Word 2016/365

Here is the document in page layout view:

Here is is in print preview, which is exactly how it prints to more than one type of printer and how it exports to PDF:

Here is the example file and the exported PDF:

https://1drv.ms/u/s!AoMDi2QeBPfKkUgIN_th8MzKYukz?e=f7Bnfg

Can anyone suggest a fix or a workaround?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

12 answers

Sort by: Most helpful
  1. Anonymous
    2020-06-20T12:38:29+00:00

    Stefen,

    Your first suggestion made me think further about the letter content. My letter templates from which the letter is merged do indeed use hidden text to decide whether or not to print the header/footer to allow for printing on plain paper or pre-printed stationary. 

    In my tests, Word 365 has got Display Hidden Text set and Print Hidden Text cleared in the options. When I set the options to display and print hidden text, I see and print a 3 page document. When I set them both to not display/print the hidden text, I see and print a 2 page document. 

    There must be the remnants of some hidden text somewhere in the document. I can't find it with Advanced Find, but I suspect it is there somewhere.

    My previous versions of Word all had both options set. I assume that this is the default setting and that I had changed the setting on Word 365 which I use on a day-to-day basis.

    My page counting code needs to ensure that these settings match. I will modify it to make sure that the options are set to display and print hidden text, because I will always want to export header/footers to PDF to ensure the logos etc. are shown in the document.

    Thank you for your help.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Charles Kenyon 167.4K Reputation points Volunteer Moderator
    2020-06-19T22:43:06+00:00

    Word can always give a different page count when printing to different printers. For this purpose, saving to pdf is the equivalent of printing.

    Why has my page layout changed when I open my document on a different machine? by Suzanne Barnhill, MVP

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Stefan Blom 341.3K Reputation points MVP Volunteer Moderator
    2020-06-19T22:15:01+00:00

    Well, you can always reapply any lost text formatting. The document I (re-)created no longer adds a superfluous page when you convert it to PDF, via the Save As dialog box.

    The purpose of copying content and omitting the final paragraph mark is to flush out any damaged structures (that is, document corruption). Are you saying that the document, when you test it, still behaves strangely?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2020-06-19T20:27:20+00:00

    Thank you Stefan.

    I do not think there is hidden text in the document. As you know, the header and footer and page layout information is stored in a in the last paragraph mark of each section a document. By omitting the last paragraph mark of the document, you have deleted the last section's header and footer. You have also lost  the paragraph formatting of the last paragraph of the document, which has no lost its hanging indent.

    I'm afraid that that has not worked.

    Such a workaround would not provide me with a solution even if it had worked. How would I even know when I am reading the page count of the document that it would be different to the exported PDF?

    This is not a freak document. I have seen this occur before when I developed the code to send the document to Docmail. On that occasion we put it down to differences in Word versions. But there is clearly a problem here that with a given document, Word 365 is printing the wrong number of pages when all earlier versions of Word do not have a problem with the very same document.

    I appreciate you help. I posted the problem here because I knew I would find the very best minds to tackle this very strange phenomena.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Stefan Blom 341.3K Reputation points MVP Volunteer Moderator
    2020-06-19T19:04:47+00:00

    In your example document, I see three pages when nonprinting marks are displayed, because some of the content is being pushed to the third page (for some reason).

    I'm guessing that there are some hidden content in the file, but I haven't been able to locate it.

    Anyway, what you can do is copy document content, minus the final paragrah mark (¶), into a new, blank document. (To show/hide nonprinting marks, click the ¶ icon on the Home tab.)

    I have done that and uploaded the modified document to this folder: https://1drv.ms/u/s!AvS-HIVsUYvxh02-XNKCMfJ6Gjyr?e=vlmcUz. Download it and post back when you have retrieved it.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments