none
LISTNUM fieldcode issue RRS feed

  • Question

  • Hello,

    I am using Powertools to convert word to html. I see that openxmlpowertools is not recognizing the fieldcode LISTNUM and its listlabel value. So someone please clarify me whether it is a known behavior or if it’s not how to fix it then?

    Thanks in Advance!!
     Manohar

    Thursday, February 16, 2017 10:23 AM

All replies

  • HI,

    >>I see that openxmlpowertools is not recognizing the fieldcode LISTNUM and its listlabel value.

    I suggest you check its xml and see if the fieldcode and listlabel value exist.

    I think you want to retrieve the display value like 1) 2).

    After checking its xml, the listnum field is stored as picture below, I think we could get its field code like LISTNUM, but could not get its label. 

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 17, 2017 8:20 AM
    Moderator
  • Thanks Celeste,  Yes, i could get the fieldcode vaue but not the label.

    So how can i get the label now? its very important for our application to read the numbering of all the paragraphs. 

    Friday, February 17, 2017 8:46 AM
  • Hi,

    I am not familiar with OpenXMLPowerTools but I think the logic are the same.

    After more researching, I think whether we could get its value depend on how we insert the field or in another word, it depends on what code you are using.

    If you use full field code like {LISTNUM \l 1 \s 1} as listnumber, we could simple retrieve the level and start value.

    If you use field code like  {LISTNUM} or {LISTNUM \l 1 }, to get its actually number, we need to count the field and check the previous field code to get its level and value.

    Please see the pictures below. I think you may understand the logic behind LISTNUM field.

    >>i could get the fieldcode value but not the label.

    Since you could get its fieldcode, I think your field code are like  {LISTNUM}, so I think you could count the number of field to determine its display value.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 20, 2017 8:52 AM
    Moderator