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

📄 endnoteoptions.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
 Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!\n this is a test!"); EndNoteOptions endNoteOptions = baseText.getEndNoteOptions(10); System.out.println("返回尾注的编号格式:"+endNoteOptions.getNumberStyle()); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="getPosition()"><!-- --></A><H3>
getPosition</H3>
<PRE>
public int <B>getPosition</B>()</PRE>
<DL>
<DD>得到尾注的位置。
<P>
<DD><DL>

<DT><B>返回:</B><DD>尾注的位置,只能取以下值之一: <pre> NoteConstants.SECTION_END = 0;   尾注在节的结尾 NoteConstants.DOCUMENT_END = 1;  尾注在文档结尾 </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!\n this is a test!\n this is a test!"); EndNoteOptions endNoteOptions = baseText.getEndNoteOptions(10); System.out.println("返回尾注的位置:"+endNoteOptions.getPosition()); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="getStartingNumber()"><!-- --></A><H3>
getStartingNumber</H3>
<PRE>
public int <B>getStartingNumber</B>()</PRE>
<DL>
<DD>得到尾注的起始编号。
<P>
<DD><DL>

<DT><B>返回:</B><DD>起始编号 <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!\n this is a test!\n this is a test!"); EndNoteOptions endNoteOptions = baseText.getEndNoteOptions(10); System.out.println("返回尾注的起始编号:"+endNoteOptions.getStartingNumber()); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="setNumberRule(int)"><!-- --></A><H3>
setNumberRule</H3>
<PRE>
public void <B>setNumberRule</B>(int&nbsp;numberRule)</PRE>
<DL>
<DD>设置尾注的编号方式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>numberRule</CODE> - 编号方式,只能取以下值之一: <pre> NoteConstants.NUMBER_CONTINUE = 0;       编号方式为连续编号 NoteConstants.NUMBER_SECTION_START = 1;  编号方式为每节重新编号       </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!\n this is a test!\n this is a test!"); EndNoteOptions endNoteOptions = baseText.getEndNoteOptions(10); endNoteOptions.setCustomSymbol(null); endNoteOptions.setNumberStyle(NoteConstants.NUMBER_UPPER_ROMAN); baseText.addEndNote(10, 2); endNoteOptions.setNumberRule(NoteConstants.NUMBER_PAGE_START); doc.insertBreak(15,BreakConstants.BREAK_PAGE); long secondOffset = baseText.getTextLength()-1; baseText.insertText(secondOffset,"second page"); baseText.addEndNote(secondOffset, 2); </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/workbooks/workbook/documents/document/section/EndNote.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>EndNote</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setNumberStyle(int)"><!-- --></A><H3>
setNumberStyle</H3>
<PRE>
public void <B>setNumberStyle</B>(int&nbsp;index)</PRE>
<DL>
<DD>设置尾注的编号格式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>index</CODE> - 编号格式的索引,只能取以下值之一: <pre> NoteConstants.NUMBER_DECIMAL                编号格式为“1,2,3,...” NoteConstants.NUMBER_SBC_CASE               编号格式为“全角” NoteConstants.NUMBER_UPPER_ALPHA            编号格式为“A,B,C,...” NoteConstants.NUMBER_LOWER_ALPHA            编号格式为“a,b,c,...” NoteConstants.NUMBER_LOWER_ROMAN            编号格式为“i,ii,iii,...” NoteConstants.NUMBER_UPPER_ROMAN            编号格式为“I,II,III,...” NoteConstants.NUMBER_UPPER_CHINA            编号格式为“壹,贰,叁,...” NoteConstants.NUMBER_TRADITION_LOWER_CHINA  编号格式为“一,二,三,...(繁)” NoteConstants.NUMBER_SIMPLE_LOWER_CHINA     编号格式为“一,二,三,...(简)” NoteConstants.NUMBER_UPPER_CHINA1           编号格式为"壹,貳,參 …" NoteConstants.NUMBER_EAVEN                  编号格式为“甲,乙,丙,...” NoteConstants.NUMBER_EATH                   编号格式为“子,丑,寅,...” NoteConstants.NUMBER_CIRCLE                 编号格式为“圈内数字” NoteConstants.NUMBER_BRACKET                编号格式为“括号数字” </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!\n this is a test!\n this is a test!"); EndNoteOptions endNoteOptions = baseText.getEndtNoteOptions(10); endNoteOptions.setCustomSymbol(null); endNoteOptions.setNumberStyle(NoteConstants.NUMBER_UPPER_ROMAN); baseText.addEndNote(10, 2); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当设置脚注尾注的编号格式前其自定义标记不为空
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当编号格式的索引常量不存在<DT><B>另请参见:</B><DD><A HREF="../../../../../application/constants/NoteConstants.html" title="application.constants 中的接口"><CODE>NoteConstants</CODE></A>, 
<A HREF="../../../../../application/workbooks/workbook/documents/document/section/EndNote.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>EndNote</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setPosition(int)"><!-- --></A><H3>
setPosition</H3>
<PRE>
public void <B>setPosition</B>(int&nbsp;position)</PRE>
<DL>
<DD>设置尾注的位置。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>position</CODE> - 尾注的位置,只能取以下值之一: <pre> NoteConstants.SECTION_END = 0;   尾注在节的结尾 NoteConstants.DOCUMENT_END = 1;  尾注在文档结尾 </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!\n this is a test!\n this is a test!"); EndNoteOptions endNoteOptions = baseText.getEndNoteOptions(10); endNoteOptions.setPosition(NoteConstants.DOCUMENT_END); baseText.addEndNote(10, 2); </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/workbooks/workbook/documents/document/section/EndNote.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>EndNote</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setStartingNumber(int)"><!-- --></A><H3>
setStartingNumber</H3>
<PRE>
public void <B>setStartingNumber</B>(int&nbsp;startingNumber)</PRE>
<DL>
<DD>设置尾注的起始编号。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>startingNumber</CODE> - 起始编号 <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!\n this is a test!\n this is a test!"); EndNoteOptions endNoteOptions = baseText.getEndNoteOptions(10); endNoteOptions.setCustomSymbol(null); endNoteOptions.setNumberStyle(NoteConstants.NUMBER_UPPER_ROMAN); endNoteOptions.setStartingNumber(5); baseText.addEndNote(10, 2); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当尾注的起始编号小于1<DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/section/EndNote.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>EndNote</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>类</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../application/workbooks/workbook/documents/document/DocumentView.html" title="application.workbooks.workbook.documents.document 中的类"><B>上一个类</B></A>&nbsp;
&nbsp;<A HREF="../../../../../application/workbooks/workbook/documents/document/Fields.html" title="application.workbooks.workbook.documents.document 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?application/workbooks/workbook/documents/document/EndNoteOptions.html" target="_top"><B>框架</B></A>  &nbsp;
&nbsp;<A HREF="EndNoteOptions.html" target="_top"><B>无框架</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>所有类</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  摘要:&nbsp;嵌套&nbsp;|&nbsp;字段&nbsp;|&nbsp;构造方法&nbsp;|&nbsp;<A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息:&nbsp;字段&nbsp;|&nbsp;构造方法&nbsp;|&nbsp;<A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
版权所有 2001-2006 无锡永中科技有限公司
</BODY>
</HTML>

⌨️ 快捷键说明

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