Görevim, Word 2007 veya üstü ile uyumlu bir Word belgesinde (.docx) Office Javascript API'sı aracılığıyla bir yorum yerleştirmektir.Office Javascript API'sine yorumlarınızı yerleştirin 1.1
Microsoft API aracılığıyla bunu yapmak için no doğrudan yol olduğunu anladım.
OOXML'yi Word belgesine aktarabildiğim için, bunu yorum eklemek için kullanabileceğimi düşündüm.
Word belge yapısı üzerinde bir araştırma yaptım ve yorumların "comments.xml" adlı ayrı bir XML dosyasında saklandığını ve sonra "document.xml" dosyasında bir kimlik yoluyla başvuruda bulunduğunu öğrendim (karşılık gelen bir örnek ekledim).
Word belgesine yorum eklemek için bu comments.xml
API aracılığıyla düzenleme yapmanın bir yolu var mı, yoksa bu değil mümkün mü?
örnek "document.xml":
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
mc:Ignorable="w14 wp14">
<w:body>
<w:p w:rsidR="00A9590C" w:rsidRDefault="0058668B">
<w:r>
<w:t>I am text.</w:t>
</w:r>
</w:p>
<w:p w:rsidR="0058668B" w:rsidRDefault="0058668B">
<w:commentRangeStart w:id="0"/>
<w:r>
<w:t>I am text with comment.</w:t>
</w:r>
<w:commentRangeEnd w:id="0"/>
<w:r>
<w:rPr>
<w:rStyle w:val="Kommentarzeichen"/>
</w:rPr>
<w:commentReference w:id="0"/>
</w:r>
</w:p>
<w:sectPr w:rsidR="0058668B">
<w:pgSz w:w="11906" w:h="16838"/>
<w:pgMar w:top="1417" w:right="1417" w:bottom="1134" w:left="1417" w:header="708" w:footer="708"
w:gutter="0"/>
<w:cols w:space="708"/>
<w:docGrid w:linePitch="360"/>
</w:sectPr>
</w:body>
Numune "comments.xml":
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:comments
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
mc:Ignorable="w14 wp14">
<w:comment w:id="0" w:author="rz" w:date="2015-05-23T10:30:00Z" w:initials="r">
<w:p w:rsidR="0058668B" w:rsidRDefault="0058668B">
<w:pPr>
<w:pStyle w:val="Kommentartext"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rStyle w:val="Kommentarzeichen"/>
</w:rPr>
<w:annotationRef/>
</w:r>
<w:r>
<w:t>Test</w:t>
</w:r>
<w:bookmarkStart w:id="1" w:name="_GoBack"/>
<w:bookmarkEnd w:id="1"/>
</w:p>
</w:comment>
</w:comments>