We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Move to next page- first table

In Aspose.Words:

How to I do a move to the next page, first table?

Aspose.Words.Viewer.PageNavigator() and MoveToNextPage() doesn’t seem to work for me.


Thanks for your inquiry. Could you please explain me what you are trying to achieve and provide me your code? I will try to help you.

Also note that Aspose.Words.Viewer namespace is currently in beta and limited technical support is provided for it.

Best regards.

Hi Alexey,

I’m trying to convert the following code line using the Word Object Model to use Aspose.Word but couldn’t find the equivalent or a way to do it. Thanks in advance for your help.

' need it to go to next page first table here
WordObj.Selection.GoTo(What:=wdGoToTable, Which:=wdGoToFirst, Count:=test + 1, Name:="")


Thank you for clarification.

This task can be effectively solved without underlying dependency on document pagination. You can find this table in terms of sections, bookmarks or maybe analyzing some contents. For instance, if you know it’s the first table in third section you can code this straightforwardly. Also you can put the entire table in a bookmark or place a bookmark with empty body immediately before the table.

Let me know what approach is better for you. It would be nice to see a particular sample. You can attach here your document and describe the task: what table you are going to locate and what constraints can be used.


Hi and thank you for helping me first of all.

I have a word template that consist of one section, one table per page but there are multiple pages within the same template. I can populate it, but all the data gets inserted only to the first page. All I need it to do is after it populates, move the cursor to the next page so it can go through the population again.

In the loop to populate, I tried:

I get an error that says “Reference to a non shared member requires an object reference”. If I can figure out how to move the cusor to the next page, I think that would do it.


Thanks for your inquiry. Unfortunately, Aspose.Words doesn’t have the possibility to know the end of a page. Aspose.Words document represents content and formatting of a document, not its layout into lines and pages. This feature is called pagination and it is not released yet. Please see FAQ for more information.

You should use the MoveToXXX methods to move the document builder’s cursor to a particular place or element in the document in order to insert there necessary elements after.

If you need move DocumentBuilder cursor to table cell you can use MoveToCell method. See the following link for more information.

Hope this helps.

Best regards.