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

Free Support Forum - aspose.com

Document Footnotes Issue

Hello,
During save the document getting below error. So please suggest that how can fix below issue. As I am using Aspose.Words version(16.1.0.0).

System.InvalidOperationException: Footnotes are only allowed inside the main text of the document.     
    at    .VisitFootnoteStart(Footnote )    
    at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)     
    at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)     
    at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at 
System.InvalidOperationException: Footnotes are only allowed inside the main text of the document.
     at    .VisitFootnoteStart(Footnote )
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
     at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
     at    .(    )
     at    .(Document ,     )
     at    .     ()
     at    .(    )
     at    .(    ,     )
     at    .(Node ,     )
     at Aspose.Words.Document.UpdateFields()

@RiteshK10 Could you please attach the problematic document here for testing along with code that will allow us to reproduce the problem? We will check the issue and provide you more information.
Also, you are using quite old version of Aspose.Words, which war released about 7 years ago. Please try using the latest 23.1 version:
https://www.nuget.org/packages/Aspose.Words