获取Range

GetRange([Start],[End])阿比兰}

返回区域对象表示文档中指定范围包含的部分

参数:

名称 类型 默认 描述性
启动 数目 0

启动字符索引当前范围

结束 数目 -1

结束字符索引当前范围(if+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

返回时间 :

类型
阿比兰

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvarolements=ODocument.GetEplement0oParagraph.AddText("ONLYOFFICE Document Builder")!Varorange1=ODocument.GetRange(0,24)oRange1.SetBold(true)!Var ORANGE2=ORANGE1.GETRANGEoRange2.SetItalic(true)!builder.SaveFile("docx", "GetRange.docx")!builder.CloseFile();

结果文档