Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make Notes Invisible, Close Notes.
Message
From
22/11/2002 15:33:17
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
To
All
General information
Forum:
Lotus Notes
Category:
Programming
Title:
Make Notes Invisible, Close Notes.
Miscellaneous
Thread ID:
00725995
Message ID:
00725995
Views:
42
I've got some VB code to send email through Notes. How do I run Notes invisibly and how do I close it when I'm done? Here's my code:
    Public Sub OpenNotes( _
        ByVal txtTo As String, _
        ByVal txtSubject As String, _
        ByVal txtAttachmentName As String)

        Dim _
            Session As Object, _
            Database As Object, _
            Document As Object, _
            RichTextObject As Object

        Dim _
            User As String, _
            Server As String, _
            Mailfile As String

        'Get a handle to a notes session
        Session = CreateObject("Notes.NotesSession")

        User = Session.UserName
        Server = Session.GetEnvironmentString("MailServer", True)
        Mailfile = Session.GetEnvironmentString("MailFile", True)
        Database = Session.GetDatabase(Server, Mailfile)
        Document = Database.CreateDocument()

        With Document

            .Form = "Memo"

            .SendTo = txtTo
            .Subject = txtSubject

            RichTextItem = .CreateRichTextObject("Body")
            RichTextItem.EmbedObject(1454, "", txtAttachmentName)  ' EMBED_ATTACHMENT = 1454

            .Send(False)  'SEND(ByVal ATTACHFORM As Integer, [ByVal RECIPIENTS])

        End With
        Session = Nothing
        Database = Nothing
        Document = Nothing

    End Sub
Next
Reply
Map
View

Click here to load this message in the networking platform