To Read Cross Reference from MS Word Document and insert it in Ms Word Document

Hi,

My requirement is to read Cross Reference from MS Word Document and write the same Cross reference to Ms Word Document.

How can i achieve this using Aspose.Words.

Please share the code.

Thanks

Hi Srini,

Thanks for your inquiry. Could you please attach your source Word document from where you want to read cross reference and expected final document here for testing? We will investigate the scenario on our end and provide you more information.

Best regards,

Hi Hafeez,

Thank you for your reply.

Please find the source document as an attachment(s) to this mail.

Document contains 2 cross references. How can i retrieve using Aspose.words.

Please share the code.

Thanks

Hi Srini,

Thanks for your inquiry. Please use the following code to achieve this:

Document doc = new Document(MyDir + @"Cross+Reference+Input+Document.docx");
foreach (Field field in doc.Range.Fields)
{
    if (field.Type.Equals(FieldType.FieldRef))
    {
        FieldRef fieldRef = (FieldRef)field;
        Console.WriteLine(doc.Range.Bookmarks[fieldRef.BookmarkName].Text);
    }
}

Hope, this helps.

Best regards,

Hello,

Is this functionality available for Words Cloud?

Also - is there any documentation for this?

@rfdesouza1,

Thank you contacting Aspose Support.

Currently the feature you are requesting is not available in AW for Cloud. I have logged a feature request (WORDSCLOUD-212) with our product team and attached it to this thread, so you will be informed of any updates.

Thank you for your patience.

@rfdesouza1

Thanks for your patience. In reference to your above requirement of reading cross reference from Word document, you may use Bookmarks API for the purpose. Please let us know if you face any issue in this regard.