我为 C# 应用程序生成的 word 文档创建了目录,它工作正常
Range myRange = aDoc.Range(ref missing, ref missing);
object oStyleName = "Heading 1";
myRange.set_Style(ref oStyleName);
object start = wordApp.ActiveDocument.Content.End - 1;
Range rangeForTOC = aDoc.Range(ref start, ref missing);
TableOfContents toc = aDoc.TablesOfContents.Add(rangeForTOC, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
toc.Update();
Range rngTOC = toc.Range;
rngTOC.Font.Size = 10;
rngTOC.Font.Name = "Georgia";
但问题是当我单击内容时它不会导航到该特定部分.. 任何人都可以帮助我解决这个问题