1

Lotus Notes を起動し、vb.net プロジェクトからその使用を制御する方法を探しています。

制御とは、ウィンドウの位置を取得したり、アクティブなドキュメントを閉じたり、その他のものを閉じたりするような小さなことを意味します。

しかし、主な目的はセッションを開始することです。

Lotus Notes Automation Classes dll を使用しようとして、何もうまくいかなかったので、混乱しています...

誰かが私にいくつかのヒントを持っていれば、私はとても感謝しています! ありがとう!(ちなみに、申し訳ありませんが英語は私の主要言語ではありません)

4

3 に答える 3

3

Notes では、セッションは UI オブジェクトではなく、バックエンド オブジェクトです。あなたが説明すること(ウィンドウの位置を変更する、アクティブなウィンドウを閉じるなど)はUI機能です。

Notes は COM をサポートしており、すべてのバックエンド クラスに完全にアクセスできます。ただし、UI クラスにはアクセスできません。

実際の Notes クライアントを自動化したいのはなぜですか? あなたが最終的に何をしたいのかを説明していただければ、私たちがお手伝いできるかもしれません。あなたがやろうとしていることを解決する正しい方法は、バックエンドクラスを使用することだと確信しています...

于 2013-03-04T15:51:41.327 に答える
0

Notes を開始する方法を見つけました。プロセスを使用する必要がありました。

 Private Sub StartNotes()
    Dim p As Process = New Process()

    p.StartInfo.FileName = "C:\Program Files\Notes\notes.exe"
    p.StartInfo.Arguments = ""

    p.Start()

  End Sub

lotus と domino dll のバックエンド クラスを使用した後、自動化します。

于 2013-03-11T13:42:19.550 に答える
0
Sub Send_Email_via_Lotus_Notes()
Dim Maildb As Object
Dim MailDoc As Object
Dim Body As Object
Dim Session As Object
'Start a session of Lotus Notes
    Set Session = CreateObject("Lotus.NotesSession")
'This line prompts for password of current ID noted in Notes.INI
    Call Session.Initialize
'or use below to provide password of the current ID (to avoid Password prompt)
    'Call Session.Initialize("<password>")
'Open the Mail Database of your Lotus Notes
    Set Maildb = Session.GETDATABASE("", "D:\Notes\data\Mail\eXceLiTems.nsf")
    If Not Maildb.IsOpen = True Then Call Maildb.Open
'Create the Mail Document
    Set MailDoc = Maildb.CREATEDOCUMENT
    Call MailDoc.REPLACEITEMVALUE("Form", "Memo")
'Set the Recipient of the mail
    Call MailDoc.REPLACEITEMVALUE("SendTo", "Ashish Jain")
'Set subject of the mail
    Call MailDoc.REPLACEITEMVALUE("Subject", "Subject Text")
'Create and set the Body content of the mail
    Set Body = MailDoc.CREATERICHTEXTITEM("Body")
    Call Body.APPENDTEXT("Body text here")
'Example to create an attachment (optional)
    Call Body.ADDNEWLINE(2)
    Call Body.EMBEDOBJECT(1454, "", "C:\dummy.txt", "Attachment")
'Example to save the message (optional) in Sent items
    MailDoc.SAVEMESSAGEONSEND = True
'Send the document
'Gets the mail to appear in the Sent items folder
    Call MailDoc.REPLACEITEMVALUE("PostedDate", Now())
    Call MailDoc.SEND(False)
'Clean Up the Object variables - Recover memory
    Set Maildb = Nothing
    Set MailDoc = Nothing
    Set Body = Nothing
    Set Session = Nothing
End Sub
于 2014-12-11T12:26:26.587 に答える