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

Free Support Forum - aspose.com

Move to a Section Position

Dear Sir

I have some section in my document and I want to move to each of them.I wrote this code:

Dim document As Aspose.Words.Document

Dim objsection As Aspose.Words.Section

Dim builder As DocumentBuilder = New DocumentBuilder(document)

builder.MoveTo(objsection)

.

.

.

But I catch this error:

"Exception 'The node must be a paragraph or a direct child of a paragraph.' occured in Aspose.Words for .NET 5.2.0.0. For free technical support, please post this error and the file in the Aspose.Words Forums http://www.aspose.com/forums/ShowForum.aspx?ForumID=75."

Please tell me how do it.

Thanks

Mehdi Mokhtari

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. I think that you should use MoveToSection method. This method takes section index as parameter. Please see the following link for more information.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/moving-to-a-section.html

Best regards.

Dear Sir

Thanks for your quick and useful reply.

It's work and solved my problem.

Thanks

Mehdi Mokhtari