0
C#에서 단어 문서를 읽고 있는데, 그것을 읽은 후 선택한 단락에 대한 설명을 입력해야합니다.2010 년 단어의 단락 색인을 찾는 방법
그래서 C#을 통해 단락의 색인을 찾아야합니다.
foreach (Microsoft.Office.Interop.Word.Paragraph aPar in oDoc.Paragraphs) // looping through all the paragh in document
{
Microsoft.Office.Interop.Word.Range parRng = aPar.Range;
string sText = parRng.Text;
if (sText == para[1].ToString()) // found the paragraph and i need the index of this paragraph
{
oDoc.Comments.Add(oDoc.Paragraphs[0].Range, ref comments); // to add the comment in document
}
}
해당 단락의 색인을 찾으면 해당 단락에 주석을 삽입 할 수 있습니까? 가능한가?
또는 다른 방법이 있습니까?