• Notes常用事件整理


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

    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

  • 相关阅读:
    网格形变
    网格简化
    无法打开包括文件: “QWidget”: No such file or directory
    遇到一个 bug svg 抖动的解决方案
    echarts-gl 遇到一个错误 groupGL 未定义
    鼠标操控三维视角
    鼠标控制3维操作 不知道能不能获得一些灵感
    tensorflow 安装
    Codeforces Round #541 (Div. 2) B.Draw!
    Codeforces Round #541 (Div. 2) A.Sea Battle
  • 原文地址:https://www.cnblogs.com/vonk/p/3896894.html
Copyright © 2020-2023  润新知