使用Lotusscript在RTF文本中插入热点 [英] Inserting a hotspot inside a rich text in using lotusscript

查看:130
本文介绍了使用Lotusscript在RTF文本中插入热点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要做的是创建一个热点链接并将其附加到RTF内.我已经找到了一种通过以下链接实现此目标的方法:

What I need to do is to create a hotspot link and attached it inside a rich text. I already found a way to implement this by following this link:

http://ozinisle.blogspot. com/2010/11/lotusscript-code-to-append-hotspot-to.html

现在,我希望创建的热点位于现有的RTF字段的内部或中间.如果您检查了该链接,该链接创建的文档带有用于该热点的富文本格式的文本,则无法确定是否尝试使用nav和range将其插入到该文档中,但是它只是获取纯文本,我也想获取该热点链接.谢谢.

Now I want the created hotspot to be inside or in the middle of an existing rich text field. If you checked the link it creates a document with a body rich text for the hotspot, I can't identify inserting it inside tried using nav and range but it just gets the plain text, I also want to get the hotspot link. Thanks.

这是示例代码(我们在其中添加了富文本格式,但是我想在其中插入它-我找到了一种方法,但是使用DXL也会使它感到困惑)是否有解决此问题的简便方法:

Here is a sample codes (where we append the rich text, but I want to insert it inside - I found a way but it's confusing also using DXL) is there a easy way to solve this:

If rtnav.FindFirstString("<Reply: From>", RT_FIND_CASEINSENSITIVE) Then

    ' Get the <Reply:From> string
    Call rtrange.SetBegin(rtnav)
    Call rtrange.SetEnd(rtnav)

    ' Remove the <Reply:From> string
    Call rtrange.Remove()

    ' Go to the next text range after the <Reply:From> string
    Call rtrange.SetBegin(rtnav)
    Call rtrange.SetEnd(rtnav)

    ' Insert the hotspot in the right place
    Call rtitem.BeginInsert(rtrange, False)

    ' ** I WANT TO INSERT HERE THE HOTSPOT, BUT I CAN'T FIGURE IT OUT **

    Call rtitem.EndInsert

    Call rtitem.AppendRTItem(dxlbody)

End If

推荐答案

我基本上可以通过应用或使用DXL来实现我的目标.我操纵了两个富文本DXL,因此能够将热点链接插入到富文本中.尽管它需要很多代码,并且有点令人困惑,但确实可以用它来实现.

Hi I was able to accomplish my goal by basically applying or using DXL. I manipulated the two rich text DXL thus I was able to insert the hotspot link inside the rich text. Though it requires a lot of codes and it's bit confusing it can be indeed accomplished by that.

特别感谢Richard和Ken对每个人的帮助.

Thanks for everyone's help specially to Richard and Ken.

我使用了这个来源:

http://searchdomino.techtarget. com/tip/How-to-insert-RichText-into-RichText-using-LotusScript

这篇关于使用Lotusscript在RTF文本中插入热点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆