首页 热点资讯 义务教育 高等教育 出国留学 考研考公

Aspose.Words在word文档合并时如何控制列表编号

发布网友 发布时间:2022-04-25 20:25

我来回答

1个回答

热心网友 时间:2022-06-17 03:37

  在MyStyle的超链接样式下,用ImportFormatMode.KeepSourceFormatting 保留源文件格式的列表编号的代码如下:
  C#
  Document dstDoc = new Document(gDataDir + "TestFile.DestinationList.doc");
Document srcDoc = new Document(gDataDir + "TestFile.SourceList.doc");
  // Append the content of the document so it flows continuously.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;
  dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting);
dstDoc.Save(gDataDir + "TestFile.ListKeepSourceFormatting Out.doc");
  Visual Basic
  Dim dstDoc As New Document(gDataDir & "TestFile.DestinationList.doc")
Dim srcDoc As New Document(gDataDir & "TestFile.SourceList.doc")
  ' Append the content of the document so it flows continuously.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous
  dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting)
dstDoc.Save(gDataDir & "TestFile.ListKeepSourceFormatting Out.doc")

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com