none
Word Automation not correctly advancing page for table cells spanning page boundary RRS feed

  • Question

  • Greetings,

    I am using Word Automation (Office 365 Pro Plus) with Windows Server 2012 R2.  The code advances the insertion point to the beginning of the next page using the Browser.Next() method.  If the page boundary has table cells that are split across the boundary, then the advancement is different depending on whether the Word application is set to visible or not. 

    Page advancement for the above case is correct when visibility is set to true.  It is incorrect when set to false.    

    The code to set visibility and advance the page is as follows:

    Application wordApplication = new Word.Application();
    wordApplication.Visible =
    true;

    wordApplication.Browser.Target = Word.WdBrowseTarget.wdBrowsePage;
    wordApplication.Browser.Next();

    I am aware of the 257757 article: Considerations for server-side Automation of Office.

    Is this an example of “applications may need be made visible for certain Automation functions to work correctly” or some other issue?

    Thank you

    Thursday, August 10, 2017 10:30 PM

Answers

  • Hi brantdev,

    I suggest you do the same test on local pc. If setting visibility true or false in local pc both work well, I think it should be the example of applications may need be made visible for certain Automation functions to work correctly” 

    Best Regards,

    Terry

    • Marked as answer by brantdev Monday, August 14, 2017 9:11 PM
    Sunday, August 13, 2017 11:22 PM

All replies

  • Hi brantdev,

    I suggest you do the same test on local pc. If setting visibility true or false in local pc both work well, I think it should be the example of applications may need be made visible for certain Automation functions to work correctly” 

    Best Regards,

    Terry

    • Marked as answer by brantdev Monday, August 14, 2017 9:11 PM
    Sunday, August 13, 2017 11:22 PM
  • Hi Terry,

    Yes, when I tested it locally, the visibility setting did not change the result; i.e., both worked as expected.

    Thank you for your reply!

    Monday, August 14, 2017 9:11 PM