xml - Cannot get the checkbox value from MS Word using Interop c# -


i trying checkbox value 1 .doc ms word document, reading .docx using openxml easier because implicit in output xml:

<w:checkbox>     <w:sizeauto/>     <w:default w:val=\"1\"/> </w:checkbox> 

but, output xml getting document.content.xml using interop not possible, because value not implicit:

               <w:p wsp:rsidr=\"00040b2e\" wsp:rsidrpr=\"00a81c11\" wsp:rsidrdefault=\"00040b2e\" wsp:rsidp=\"001e040c\">                         <w:ppr>                             <w:spacing w:before=\"120\"/>                             <w:rpr>                                 <w:rfonts w:ascii=\"arial\" w:h-ansi=\"arial\" w:cs=\"arial\"/>                                 <wx:font wx:val=\"arial\"/>                                 <w:sz w:val=\"18\"/>                                 <w:sz-cs w:val=\"18\"/>                             </w:rpr>                         </w:ppr>                         <w:r wsp:rsidrpr=\"00a81c11\">                             <w:rpr>                                 <w:rfonts w:ascii=\"arial\" w:h-ansi=\"arial\"/>                                 <wx:font wx:val=\"arial\"/>                                 <w:b/>                                 <w:sz w:val=\"18\"/>                                 <w:sz-cs w:val=\"18\"/>                             </w:rpr>                             <w:fldchar w:fldchartype=\"begin\">                                 <w:flddata xml:space=\"preserve\">/////2uaaaauabiaswbvag4adabyag8ababsagsa5abzahqaywboaguabgayadmaaaaaaaaaaaaa\r\naaaaaaaaaaaaaaaaaaaa\r\n</w:flddata>                             </w:fldchar>                         </w:r>                         <w:r wsp:rsidrpr=\"00a81c11\">                             <w:rpr>                                 <w:rfonts w:ascii=\"arial\" w:h-ansi=\"arial\"/>                                 <wx:font wx:val=\"arial\"/>                                 <w:b/>                                 <w:sz w:val=\"18\"/>                                 <w:sz-cs w:val=\"18\"/>                             </w:rpr>                             <w:instrtext> formcheckbox </w:instrtext>                         </w:r>                         <w:r wsp:rsidrpr=\"00a81c11\">                             <w:rpr>                                 <w:rfonts w:ascii=\"arial\" w:h-ansi=\"arial\"/>                                 <wx:font wx:val=\"arial\"/>                                 <w:b/>                                 <w:sz w:val=\"18\"/>                                 <w:sz-cs w:val=\"18\"/>                             </w:rpr>                         </w:r>                         <w:r wsp:rsidrpr=\"00a81c11\">                             <w:rpr>                                 <w:rfonts w:ascii=\"arial\" w:h-ansi=\"arial\"/>                                 <wx:font wx:val=\"arial\"/>                                 <w:b/>                                 <w:sz w:val=\"18\"/>                                 <w:sz-cs w:val=\"18\"/>                             </w:rpr>                             <w:fldchar w:fldchartype=\"end\"/>                         </w:r>                     </w:p> 

my c# code extracting xml:

microsoft.office.interop.word._application word = new microsoft.office.interop.word.application();         microsoft.office.interop.word.document doc = word.documents.open(path);         xml_from_doc = doc.content.xml;         doc.close();         word.quit(); 

any suggestions please? in advance!


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -