⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textrange.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将当前文本范围对象进行偏移返回一个新的文本范围对象。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#paste()">paste</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将当前文本区域内容(包括图像,域,多媒体等对象)替换成剪贴板中的内容。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#pasteFormat()">pasteFormat</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前区域的内容应用剪贴板的格式。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#protect(java.lang.String, java.lang.String)">protect</A></B>(java.lang.String&nbsp;lockedText,
        java.lang.String&nbsp;password)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;插入锁定文本的保护。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#select()">select</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;选中当前区域的文本。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setBorderAttribute(application.workbooks.workbook.style.border.BorderAttribute)">setBorderAttribute</A></B>(<A HREF="../../../../../application/workbooks/workbook/style/border/BorderAttribute.html" title="application.workbooks.workbook.style.border 中的类">BorderAttribute</A>&nbsp;borderAttribute)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前区域格式化边框。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setBulletedNumber(application.workbooks.workbook.documents.document.WordBulletLevel, boolean)">setBulletedNumber</A></B>(<A HREF="../../../../../application/workbooks/workbook/documents/document/WordBulletLevel.html" title="application.workbooks.workbook.documents.document 中的类">WordBulletLevel</A>&nbsp;wordBulletLevel,
                  boolean&nbsp;isContinue)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;应用项目符号或编号列表到当前选择区域。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setBulletedNumber(application.workbooks.workbook.documents.document.WordBulletLevel, boolean, int)">setBulletedNumber</A></B>(<A HREF="../../../../../application/workbooks/workbook/documents/document/WordBulletLevel.html" title="application.workbooks.workbook.documents.document 中的类">WordBulletLevel</A>&nbsp;wordBulletLevel,
                  boolean&nbsp;isContinue,
                  int&nbsp;applyTo)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;应用项目符号和编号列表到当前选择区域。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setColumn(application.workbooks.workbook.documents.document.Column)">setColumn</A></B>(<A HREF="../../../../../application/workbooks/workbook/documents/document/Column.html" title="application.workbooks.workbook.documents.document 中的类">Column</A>&nbsp;column)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置指定文本区域的分栏属性。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setFitTextWidth(float)">setFitTextWidth</A></B>(float&nbsp;width)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置指定区域的调整宽度</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setFitTextWidthOfChar(float)">setFitTextWidthOfChar</A></B>(float&nbsp;width)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置指定区域的调整宽度</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setFontAttribute(application.workbooks.workbook.style.font.FontAttribute)">setFontAttribute</A></B>(<A HREF="../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类">FontAttribute</A>&nbsp;fontAttribute)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前区域的字符串进行格式化(默认情况下替换原先的属性)。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setFontAttribute(application.workbooks.workbook.style.font.FontAttribute, boolean)">setFontAttribute</A></B>(<A HREF="../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类">FontAttribute</A>&nbsp;fontAttribute,
                 boolean&nbsp;replace)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前区域的字符串进行格式化。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setOutlinedNumber(application.workbooks.workbook.documents.document.WordBulletLevel[], boolean)">setOutlinedNumber</A></B>(<A HREF="../../../../../application/workbooks/workbook/documents/document/WordBulletLevel.html" title="application.workbooks.workbook.documents.document 中的类">WordBulletLevel</A>[]&nbsp;bulletLevelArray,
                  boolean&nbsp;isContinue)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;应用多级编号列表到当前选择区域。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setParagraphAttribute(application.workbooks.workbook.style.paragraph.ParagraphAttribute)">setParagraphAttribute</A></B>(<A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类">ParagraphAttribute</A>&nbsp;paragraphAttribute)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前区域的字符串进行段落格式化(默认情况下替换原先的属性)。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setParagraphAttribute(application.workbooks.workbook.style.paragraph.ParagraphAttribute, boolean)">setParagraphAttribute</A></B>(<A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类">ParagraphAttribute</A>&nbsp;paragraphAttribute,
                      boolean&nbsp;replace)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前区域的字符串进行段落格式化。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setPhoneticAttribute(application.workbooks.workbook.style.phonetic.PhoneticAttribute)">setPhoneticAttribute</A></B>(<A HREF="../../../../../application/workbooks/workbook/style/phonetic/PhoneticAttribute.html" title="application.workbooks.workbook.style.phonetic 中的类">PhoneticAttribute</A>&nbsp;phonetic)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;给当前的文本区域内容添加拼音。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setShadingAttribute(application.workbooks.workbook.style.border.ShadingAttribute)">setShadingAttribute</A></B>(<A HREF="../../../../../application/workbooks/workbook/style/border/ShadingAttribute.html" title="application.workbooks.workbook.style.border 中的类">ShadingAttribute</A>&nbsp;shadingAttribute)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前区域格式化文字底纹。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#setTwoLinesInOne(int)">setTwoLinesInOne</A></B>(int&nbsp;bracket)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置当前文本区域中内容的格式,使两行文本合并为一行,并指定括住文本的字符。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#sort(application.workbooks.workbook.documents.document.WpSortProperties)">sort</A></B>(<A HREF="../../../../../application/workbooks/workbook/documents/document/WpSortProperties.html" title="application.workbooks.workbook.documents.document 中的类">WpSortProperties</A>&nbsp;sortProperties)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前的文本区域进行按列排序。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#tcscConverter(boolean)">tcscConverter</A></B>(boolean&nbsp;sctc)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前区域的字符串进行简繁体转换。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.html#updateField()">updateField</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;更新当前区域内的所有域。</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>从类 java.lang.Object 继承的方法</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>方法详细信息</B></FONT></TH>
</TR>
</TABLE>

<A NAME="changeCase(int)"><!-- --></A><H3>
changeCase</H3>
<PRE>
public void <B>changeCase</B>(int&nbsp;type)</PRE>
<DL>
<DD>对当前文本区域的字符串更改大小写。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 更改大小写的类型。只能取以下值之一: <pre> ChangeCaseConstants.SENTENCECASE    表示句首字母大写 ChangeCaseConstants.LOWERCASE       表示小写 ChangeCaseConstants.UPPERCASE       表示大写 ChangeCaseConstants.TITLECASE       表示词首字母大写 ChangeCaseConstants.TOGGLECASE      对所选内容进行大小写转换,即大写字母转换为小写,小写字母转换为大写 ChangeCaseConstants.DBCCASE         表示半角 ChangeCaseConstants.SBCCASE         表示全角 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); TextRange range = baseText.getRange(2,6); range.changeCase(ChangeCaseConstants.UPPERCASE); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定的大小写类型不存在<DT><B>另请参见:</B><DD><A HREF="../../../../../application/constants/ChangeCaseConstants.html" title="application.constants 中的接口"><CODE>ChangeCaseConstants</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="clearFormats()"><!-- --></A><H3>
clearFormats</H3>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -