The result is awful: the items are followed by a comma, and the whole list of pages separated with comma.
We’d like to have it formatted like in word if we insert (there’s a tab between the quotes):
Thanks for your inquiry. Please manually create your expected Word document using Microsoft Word, Zip and attach it here for our reference. We will investigate how you want your final Word output be generated like. We will then provide you more information on this along with code.
We have tested the scenario using latest version of Aspose.Words for Java 17.8 with following code example and have not found the shared issue. Please use Aspose.Words for Java 17.8.
Unfortunately, Aspose.Words does not support the requested feature at the moment. However, we have logged this feature request as WORDSNET-15773 in our issue tracking system to right align the page numbers in index field. You will be notified via this forum thread once this feature is available.We apologize for your inconvenience.
Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15778 . You will be notified via this forum thread once this issue is resolved.
Thanks Awais,
Now aspose 17.11 doesn’t crash on that code anymore, but the index doesn’t have any pointer to the actual markers. The only line in the index says the item appears in page 0 (zero).
Yves
Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-16225. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.
Could you please share the Java version that you are using at your end? Thanks for your cooperation.
Thanks for your patience. It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-16225) as ‘Not a Bug’. Please use following solution to get the desired output.
Use the DocumentBuilder.InsertField(fieldCode, fieldValue) overload.