有任何方法可以在Lotusscript中设置节的样式吗?我想模仿荷花笔记中的回覆部分的类型。
使用lotusscript
我可以看到如何设置颜色,字体等,但我看不出如何设置该部分的实际样式。
发布于 2012-07-18 15:41:43
我认为您能够做到这一点的唯一方法是使用DXL。也就是说,对包含您想要的样式的部分的文档进行DXL导出。编写代码以生成相同的DXL,并根据您需要定制的任何内容(例如标题)进行修改,并将其导入新文档。然后编写代码来打开这个新文档,读取包含该部分的富文本项,并使用AppendRTItem将其放到正在处理的文档中。
发布于 2012-07-22 07:47:18
查看您的配置文件,您已经熟悉Xpages。
如果应用程序不复杂,我会选择Xpages。因为造型更容易,所以在一个贸易。笔记应用程序。对我来说就是这样。
这里是lotusscript的一个例子,它在备忘录中创建了部分,因为我不确定您正在制作什么样的应用程序,以及用于什么平台、备注、网络,或者两者兼备。
在打破标准杆上是一个示例,它使用邮件文件、备注表单,并将节和文本放置在邮件正文中。
这是代码
Sub Initialize
Dim session As New NotesSession
Dim mailDb As New NotesDatabase("", "")
Dim ws As New NotesUIWorkspace
Dim doc As NotesDocument
Dim body As NotesRichTextItem
Dim style As NotesRichTextStyle
Dim color As NotesColorObject
Call mailDb.OpenMail
Set doc = mailDb.CreateDocument
Call doc.ReplaceItemValue("Form", "Memo")
Set body = doc.CreateRichTextItem("Body")
Set style = session.CreateRichTextStyle
Set color = session.CreateColorObject
Call body.AppendText("This is some text before the section")
Call body.AddNewline(2)
Call body.BeginSection("Expanded Section", style, color, True)
Call body.AppendText("Here is some text within the section")
Call body.AddNewline(2)
Call body.AppendText("Here is some more text within the section")
Call body.EndSection
Call body.AddNewline(2)
Call body.AppendText("This is some text between the two sections")
Call body.AddNewline(2)
Call body.BeginSection("Collapsed Section")
Call body.AppendText("Here is some text within the section")
Call body.AddNewline(2)
Call body.AppendText("Here is some more text within the section")
Call body.EndSection
Call body.AddNewline(2)
Call body.AppendText("This is some text after the section")
Call doc.Save(True, False, False)
Call ws.EditDocument(True, doc)
Call doc.Remove(True)
End Sub对于完整性,这里是一个教程,如何从xpage 教程-入门-XPages-练习-20希望调用lotusscript代理,这是有帮助的。
编辑:刚想起他们在便笺客户端持有一个关于css和html的调查。
https://stackoverflow.com/questions/11475167
复制相似问题