📄 hyperlink.html
字号:
<p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!"); Hyperlink hyperlink = new Hyperlink(); hyperlink.setHyperlinkType(HyperlinkConstants.THIS_BINDER_POSITION); hyperlink.setShowText("aa"); hyperlink.setScreenTip("myAA"); hyperlink.hyperLinkToTopOfDocumnet(doc); baseText.insertHyperlink(0,5,hyperlink); </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/HyperlinkConstants.html" title="application.constants 中的接口"><CODE>HyperlinkConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setActionIndex(int)"><!-- --></A><H3>
setActionIndex</H3>
<PRE>
public void <B>setActionIndex</B>(int actionIndex)</PRE>
<DL>
<DD>设置动作选项的index
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE>application.workbooks.workbook.style.hyperlink.HyperlinkAttribute</CODE> 中的 <CODE>setActionIndex</CODE></DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>actionIndex</CODE> - 动作选项索引</DL>
</DD>
</DL>
<HR>
<A NAME="setAddress(java.lang.String)"><!-- --></A><H3>
setAddress</H3>
<PRE>
public void <B>setAddress</B>(java.lang.String address)</PRE>
<DL>
<DD>设置超链接目标区域。
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE>application.workbooks.workbook.style.hyperlink.HyperlinkAttribute</CODE> 中的 <CODE>setAddress</CODE></DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>address</CODE> - 超链接目标区域 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!"); Hyperlink hyperlink = new Hyperlink(); hyperlink.setHyperlinkType(HyperlinkConstants.OLD_FILE); hyperlink.setScreenTip("this is a test"); hyperlink.setShowText("超链接"); hyperlink.setAddress("http://www.sina.com"); baseText.insertHyperlink(0,5,hyperlink); </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/HyperlinkConstants.html" title="application.constants 中的接口"><CODE>HyperlinkConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setEmailAddress(java.lang.String)"><!-- --></A><H3>
setEmailAddress</H3>
<PRE>
public void <B>setEmailAddress</B>(java.lang.String emailAddress)</PRE>
<DL>
<DD>设置需要超链的邮件地址(仅对电子邮件有效)。
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE>application.workbooks.workbook.style.hyperlink.HyperlinkAttribute</CODE> 中的 <CODE>setEmailAddress</CODE></DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>emailAddress</CODE> - 邮件的地址 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!"); Hyperlink hyperlink = new Hyperlink(); hyperlink.setHyperlinkType(HyperlinkConstants.EMAIL_ADDRESS); hyperlink.setEmailAddress("userName@wx88.net"); baseText.insertHyperlink(0,5,hyperlink); </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/HyperlinkConstants.html" title="application.constants 中的接口"><CODE>HyperlinkConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setEmailAddress(java.lang.String, java.lang.String)"><!-- --></A><H3>
setEmailAddress</H3>
<PRE>
public void <B>setEmailAddress</B>(java.lang.String emailAddress,
java.lang.String subject)</PRE>
<DL>
<DD>设置需要超链的邮件地址(仅对电子邮件有效)。
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE>application.workbooks.workbook.style.hyperlink.HyperlinkAttribute</CODE> 中的 <CODE>setEmailAddress</CODE></DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>emailAddress</CODE> - 邮件的地址<DD><CODE>subject</CODE> - 邮件的主题 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!"); Hyperlink hyperlink = new Hyperlink(); hyperlink.setHyperlinkType(HyperlinkConstants.EMAIL_ADDRESS); hyperlink.setEmailAddress("userName@wx88.net","aa"); baseText.insertHyperlink(0,5,hyperlink); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数emailAddress为空或其长度为0<DT><B>另请参见:</B><DD><A HREF="../../../../../application/constants/HyperlinkConstants.html" title="application.constants 中的接口"><CODE>HyperlinkConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setHyperlinkType(int)"><!-- --></A><H3>
setHyperlinkType</H3>
<PRE>
public void <B>setHyperlinkType</B>(int type)</PRE>
<DL>
<DD>设置超链接的类型。
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE>application.workbooks.workbook.style.hyperlink.HyperlinkAttribute</CODE> 中的 <CODE>setHyperlinkType</CODE></DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 超链接的类型 <pre> 以下为常量类型: HyperlinkConstants.OLD_FILE - 表示原有的文件或网页; HyperlinkConstants.THIS_BINDER_POSITION - 表示本文档中的位置; HyperlinkConstants.NEW_BINDER - 表示新建文档; HyperlinkConstants.EMAIL_ADDRESS - 表示邮件地址 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!"); Hyperlink hyperlink = new Hyperlink(); hyperlink.setHyperlinkType(HyperlinkConstants.THIS_BINDER_POSITION); hyperlink.setShowText("超链接"); hyperlink.setScreenTip("this is a test"); hyperlink.hyperLinkToTopOfDocumnet(doc); baseText.insertHyperlink(0,5,hyperlink); System.out.println("hyperlinkType is " + baseText.getHyperlink(0,3).getHyperlinkType()); </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/HyperlinkConstants.html" title="application.constants 中的接口"><CODE>HyperlinkConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setScreenTip(java.lang.String)"><!-- --></A><H3>
setScreenTip</H3>
<PRE>
public void <B>setScreenTip</B>(java.lang.String tipText)</PRE>
<DL>
<DD>设置提示信息
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE>application.workbooks.workbook.style.hyperlink.HyperlinkAttribute</CODE> 中的 <CODE>setScreenTip</CODE></DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>tipText</CODE> - 提示信息 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!"); Hyperlink hyperlink = new Hyperlink(); hyperlink.setHyperlinkType(HyperlinkConstants.THIS_BINDER_POSITION); hyperlink.setShowText("超链接"); hyperlink.setScreenTip("this is a test"); hyperlink.hyperLinkToTopOfDocumnet(doc); baseText.insertHyperlink(0,5,hyperlink); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/constants/HyperlinkConstants.html" title="application.constants 中的接口"><CODE>HyperlinkConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setShowText(java.lang.String)"><!-- --></A><H3>
setShowText</H3>
<PRE>
public void <B>setShowText</B>(java.lang.String showText)</PRE>
<DL>
<DD>设置显示文本
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE>application.workbooks.workbook.style.hyperlink.HyperlinkAttribute</CODE> 中的 <CODE>setShowText</CODE></DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>showText</CODE> - 显示文本 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!"); Hyperlink hyperlink = new Hyperlink(); hyperlink.setHyperlinkType(HyperlinkConstants.THIS_BINDER_POSITION); hyperlink.setShowText("超链接"); hyperlink.setScreenTip("this is a test"); hyperlink.hyperLinkToTopOfDocumnet(doc); baseText.insertHyperlink(0,5,hyperlink); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/constants/HyperlinkConstants.html" title="application.constants 中的接口"><CODE>HyperlinkConstants</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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>类</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
上一个类
下一个类</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?application/workbooks/workbook/style/hyperlink/Hyperlink.html" target="_top"><B>框架</B></A>
<A HREF="Hyperlink.html" target="_top"><B>无框架</B></A>
<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">
摘要: 嵌套 | 字段 | 构造方法 | <A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息: 字段 | 构造方法 | <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 + -