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

Free Support Forum - aspose.com

Unlink fields issue

I have a word document with multiple custom properties, when I try to unlink the fields in the documents related to these custom properties it removes the custom style I made for the footnote separator and reset it to the original.

Code to unlink fields

FieldsHelper.ConvertFieldsToStaticText(doc, FieldType.FieldDocProperty);

    public class FieldsHelper
    {
		/// <summary>
		/// Converts any fields of the specified type found in the descendants of the node into static text.
		/// </summary>
		/// <param name="compositeNode">The node in which all descendants of the specified FieldType will be converted to static text.</param>
		/// <param name="targetFieldType">The FieldType of the field to convert to static text.</param>
		public static void ConvertFieldsToStaticText(CompositeNode compositeNode, FieldType targetFieldType)
		{
			compositeNode.Range.Fields.Cast<Field>().Where(f => f.Type == targetFieldType).ToList().ForEach(f => f.Unlink());
		}
	}

@lssupport

We suggest you please upgrade to the latest version of Aspose.Words for .NET 21.11. If you still face problem, please ZIP and attach your input Word document here for testing.

Thank you for your replay , I updated but I am getting this msg even though we renewed the subscription
The subscription included in this license allows free upgrades until 17 Feb 2021, but this version of the product was released on 01 Nov 2021. Please renew the subscription or use a previous version of the product

@lssupport

Please ZIP and attach your input Word document here for testing. We will investigate the issue and provide you more information on it.

1 Like

In the Zip file you will find 3 docx files
Original: word document with field connected to custom property called Symh
AfterUpdatingAndUnlinking File: word doc after updating the value of the field and UNlinking the field but keeping the custom property symh
Desired: word file with desired result

If you open original and insert a footnote you will notice that the footnote separator has
specific formatting,but when you insert a footnote in the file AfterUpdatingAndUnlinking you will notice that the operator doesn’t preserve the same format after updating the field and unlinking it

Aspose.7z (51.2 KB)

@lssupport

We have tested the scenario and noticed that the footnote separator formatting is changed in output document. This issue can be reproduced without unlinking the fields. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22954. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

1 Like

Thank you for your response, I will wait for your answer but just in case is there any way to change the formatting of the footnote separator using aspose ?? I would appreciate your response

@lssupport

Unfortunately, there is no workaround available for this issue at the moment. Once we complete the analysis of this issue, we will then provide you an update on it.

Any updates regarding the issue???

@lssupport We have completed analyzing the issue. It is planned to be fixed in the next 21.12.0 version of Aspose.Words, which will be release in a month. But please note that the provided estimate is approximate and can be shifted due to the workload of the development team.

1 Like

The issues you have found earlier (filed as WORDSNET-22954) have been fixed in this Aspose.Words for .NET 22.1 update also available on NuGet.