Read settings created by Word Add-in in Aspose

Hello,

We are creating an add-in for Word which store specific values in settings.
name = value;
(Office.Settings interface - Office Add-ins | Microsoft Learn)

Is there a way to get the value with the name in Aspose ?

Thanks for your help.

@HugoBigChange

Could you please ZIP and attach your input Word document along with setting values that you want to read? We will then provide you more information about your query.

Hi,

I have attached the ZIP.
TestCustomSettings.zip (10.4 KB)

We are trying to read a custom settings "Formulae " as a variable name.

We try to get the value below :
[[formula:{"FormulaType":1,"FormulaName":"JB2","FormulaConditions":[{"Left":"[[letterDate]]","Right":"[[noteDue]]","Comparison":3}],"FormulaOperation":null,"FormulaExpression1":"[[contactName]]","FormulaExpression2":"[[parentName]]"}]]

@HugoBigChange

We have logged this feature request as WORDSNET-19605 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

@HugoBigChange

There is “Properties” collection in the “WebExtension” object. Please use the following code example to achieve your requirement. Hope this helps you.

Document doc = new Document(@"TestCustomSettings.docx");
WebExtensionPropertyCollection properties =
  doc
  .WebExtensionTaskPanes[0]
  .WebExtension
  .Properties;

WebExtensionProperty formulaProperty = null;
foreach (WebExtensionProperty property in properties)
{
  if (property.Name == "Formulae")
  {
    formulaProperty = property;
    break;
  }
}

Console.WriteLine($"formulaProperty.Name = {formulaProperty.Name}");
Console.WriteLine($"formulaProperty.Value = {formulaProperty.Value}");