AddHeadingCrossRef

添加标题CrossRef

添加标题交叉引用当前段 请注意此段必须在文档中

参数:

名称 类型 默认 描述性
srefType 标题RefTo

文本或数字引用

OPara spi段

标题段引用(必须在文档中引用)。

链接 布林安 真实性

指定引用是否插入为超链接

BAVEBELOU 布林安 虚伪

指定上下表示引用位置的词应包括在内(不使用文本和eboveBelowssRefType)

返回时间 :

类型
布林安

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvaroNewDocumentStyle=odocument.getstylevarolements=ODocument.GetEplement0oParagraph.SetStyle(oNewDocumentStyle)!oParagraph.AddText("Cross-reference method")!var aHeadingParagraphs = oDocument.GetAllHeadingParagraphs()!odeptes = Api.Createlementsodtext (标题1样式应用到标题中)oDocument.Push(oParagraph)!oParagraph.AddHeadingCrossRef("text", aHeadingParagraphs[0])!builder.SaveFile("docx", "AddHeadingCrossRef.docx")!builder.CloseFile();

结果文档