①      ボタンのクリック事件:

Sub Click(Source As Button)

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Set uidoc =ws.CurrentDocument

content = uidoc.FieldGetText( "Body" ) /文書域の値を取得する

askme = ws.Prompt(PROMPT_OK, _   /プロンプトメッセージを出す、Workspaceのメソッド

"Reminder", content)

Print Strcompare("AB", "ab", 1)     /ストータスバーに出力

End Sub

②      外部ファイルの読み込み:

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim exapp As Variant

Dim workbook As Variant

Dim worksheet As Variant

Dim myValue As String

Set uidoc =ws.CurrentDocument

'Read the excel file

Set exapp = createobject("Excel.Application")   /エクセルアプリを指定する

filenp = "f:\mail.xlsx"                   /ファイルのパスを指定する

exapp.visible=False

Set WorkBook = exapp.WorkBooks.Open(filenp)

Set WorkSheet = WorkBook.worksheets("Sheet1")

       myValue = Trim(WorkSheet.cells(1,1).value)    /エクセルシートの値を取得する

Call uidoc.FieldSetText("SendTo", myValue $)  /文書域の値を設定する

       exapp.Quit                        /エクセルアプリを閉鎖する

③、ノーツデータベースを開く:

Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Messagebox( db.ReplicaID )

Dim db As New NotesDatabase( "", "" )
    If db.OpenByReplicaID( "D19DBR11/19/A/IBM", "49257C45002186AD" ) Then
        Print( db.Title & " was successfully opened" )
    Else
        Print( "Unable to open database" )
    End If

④、ccにアドレス追加:

Sub Click(Source As Button)
    Dim ws As New NotesUIWorkspace
    Dim uidoc As NotesUIDocument
    Dim currentCc As String
    Set uidoc =ws.CurrentDocument
    currentCc = uidoc.FieldGetText( "EnterCopyTo" )
    
    content = uidoc.FieldGetText( "Body" )
    
    Dim  DefaultString As String
    Dim positionOfChar As Long
    DefaultString$ = "/Japan/IBM)"
    positionOfChar& = Instr(content, DefaultString$)
    
    Dim subString1 As String
    Dim subString2 As String
    subString1$ = Left$(content, positionOfChar&+9)
    subString2$=Right$(subString1,positionOfChar&-9)
    
    If ( currentCc ="") Then
        Call uidoc.FieldSetText( "EnterCopyTo", subString2 )
    Elseif ( Instr(currentCc, subString2)=0) Then
        Call uidoc.FieldAppendText("EnterCopyTo", "," & subString2)
    Else
        Exit Sub
    End If
End Sub

Notes常用事件整理的更多相关文章

  1. JQuery插件之【jqGrid】常用语法整理

    jqGrid常用语法整理,包含数据获取.常用函数.触发事件等 jqGrid表格数据获取相关语法 获取表格所有数据 $("#grid").jqGrid("getRowDat ...

  2. IOS常用代码整理

    常用代码整理: 12.判断邮箱格式是否正确的代码: //利用正则表达式验证 -(BOOL)isValidateEmail:(NSString *)email { NSString *emailRege ...

  3. ios手势操作,四个基本事件与六个常用事件

    基本事件包括begin,canceled,move,ended四项,如果对象的hidden属性为yes,则无效果,hidden属性必须为no;才能使用: -(void)touchesBegan:(NS ...

  4. NiosII常用函数整理

    NiosII常用函数整理 IO操作函数函数原型:IORD(BASE, REGNUM) 输入参数:BASE为寄存器的基地址,REGNUM为寄存器的偏移量函数说明:从基地址为BASE的设备中读取寄存器中偏 ...

  5. js-DOM-页面元素的兼容性、常用事件、节点

    页面元素的兼容性: 所谓的兼容性指的就是当前浏览器是否支持当前对象的属性或是方法,如果支持就是兼容,如果不支持就是不兼容. 举个例子: /** * 设置页面标签之间的文本内容的兼容性写法 * @par ...

  6. MAC机常用快捷键整理表格

    MAC机常用快捷键整理表格 范围 快捷键 说明 图形   (Command 键)在某些 Apple 键盘上,此键也可能为标志()     Control (Control 键)     Alt Opt ...

  7. jQuery--引入,基本语法,以及常用事件

    一.初识jQuery jQuery是一个JavaScript函数库.主要包含的功能有:HTML元素的选取.操作,CSS操作,HTML事件函数,JavaScript特效和动画,HTML DOM遍历和修改 ...

  8. jQuery常用事件

    1.$(document).ready() $(document).ready()是jQuery中响应JavaScript内置的onload事件并执行任务的一种典型方式.它和onload具有类似的效果 ...

  9. sublime常用快捷键整理(未完待续)

    sublime常用快捷键整理: 基本操作 cmd+o 打开文件 cmd+w 关闭当前tab cmd+n 打开新页 cmd+shift+n 打开刚刚关闭的页签 一.选择命令 1.多个单词选择 cmd+d ...

随机推荐

  1. 十大算法 pagerank 傅里叶变换

    来源于最近阅读的一些链接 首先是介绍十大算法的 http://blog.jobbole.com/70639/ 然后是pageRank算法 http://blog.jobbole.com/23286/ ...

  2. Android入门——UI(8)——Fragment(2)

    先演示一下如何在一个activity中放置两个Fragment,先定义两个Fragment <?xml version="1.0" encoding="utf-8& ...

  3. [译] 使用Using Data Quality Services (DQS) 清理用户数据

    SQL Server 2012 Data Quality Services (DQS)  允许你使用自己的知识库来清洗数据. 在本文中我会展示一个简单示例. 使用DQS清理步骤如下: A. 建立DQS ...

  4. javascript原型链继承

    一.关于javascript原型的基本概念: prototype属性:每个函数都一个prototype属性,这个属性指向函数的原型对象.原型对象主要用于共享实例中所包含的的属性和方法. constru ...

  5. c#接口和new关键字和属性访问器基础收获

    1.interface 对于接口,一把我在项目中会这样使用: interface IStudent { string Name(); string GoSchool(); } 但是呢,这样有个不好的地 ...

  6. Linux 学习之防火墙配置

    1.安装iptables防火墙 yum install iptables  2. 清除已有的iptables规则  iptables -F  iptables -X  iptables -Z  3.显 ...

  7. jQuery.attributes源码分析(attr/prop/val/class)

    回顾 有了之前的几篇对于jQuery.attributes相关的研究,是时候分析jQuery.attr的源码了 Javascript中的attribute和property分析 attribute和p ...

  8. 解决IE8下VS2005,VS2008一些向导提示脚本错误问题

      Some VS2005 and VS2008 Wizards Pop Up Script Error. Visual C++ team has discovered that after inst ...

  9. asp.net mvc 注册中的邮箱激活功能实现(一)

    基本流程图 注册页面就不再写出,现在将发送邮件的代码粘贴出来 public ActionResult SendEmial() { ; string validataCode = System.Guid ...

  10. Python中进行Base64编码和解码

    Base64编码 广泛应用于MIME协议,作为电子邮件的传输编码,生成的编码可逆,后一两位可能有“=”,生成的编码都是ascii字符.优点:速度快,ascii字符,肉眼不可理解缺点:编码比较长,非常容 ...