sending workbooks with Lotus Notes - Page 2
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: sending workbooks with Lotus Notes

  1. #11
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    That I don't do. What I've done is layered vba on vba (like I was saying earlier) so that I can enter 15 people in different cells, highlight the appropriate recipients and click the send button. They all end up with individual e-mails, with what ever attachments I've assigned to them in one batch send. It turned out to be the point of what I was doing.

    There's got to be a way, but I don't have it off the top of my head and I have a big date.

    Cheers,

    Nate

    [ This Message was edited by: NateO on 2002-02-20 18:24 ]

  2. #12
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    and also how do you close Lotus after sending the email?

  3. #13
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I thought you might be able to assign a range instead of a single cell food for thought!

  4. #14
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I should really just say create a group and put the group name in the field oh well thanks anyway

  5. #15
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yeah,

    That's one piece (of many) that I didn't mention. Lotus Notes nicknames work with this. If you have a group, it should work a name entry.

    Cheers,

    Nate

  6. #16
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Im having problems it only sends to one person and none of the cc or bccs
    weird
    doesn't send to all the people in the group only the first person.

  7. #17
    New Member
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: sending workbooks with Lotus Notes

    Ivan,

    I've been using code similar to the example that you have given and found that if Notes is not open it can cause all sorts of problems with:

    CreateObject("Notes.NotesSession") 'create notes session

    Do you know of a way to check if Notes is running first and then proceed with the emial?

    Thanks
    AJW

  8. #18
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi AJW

    Try using GetObject ... if it is not running it will return an Error. Just handle for this eg.....

    Code:
        On Error Resume Next    ' Defer error trapping.
    ' Getobject function called without the first argument returns a 
    ' reference to an instance of the application. If the application isn't
    ' running, an error occurs.
        Set objNotes = Getobject("Notes.NotesSession")
        If Err.Number <> 0 Then NotesWasNotRunning = True
        Err.Clear    ' Clear Err object in case error occurred.
    Kind Regards,
    Ivan F Moala From the City of Sails

  9. #19
    New Member
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: sending workbooks with Lotus Notes

    Hi Ivan,

    Thanks for the reply, I've been messing around with GetObject and error trapping all day to no avail.

    Set objNotes = Getobject("Notes.NotesSession")
    This gave an error when Notes was running and also when it wasn't running but the trapping did not seem to work.

    Set objNotes = GetObject("", "Notes.NotesSession")
    This worked for when Notes was running and allowed the rest of the code to run. It also tried to launch Notes when it was not running which is what I'm trying to avoid.

    Here's my code todate:

    Sub ConformationMail2()
    On Error GoTo error:
    Dim s As Object
    Dim db As Object
    Dim doc As Object

    On Error Resume Next ' Defer error trapping.
    ' Getobject function called without the first argument returns a
    ' reference to an instance of the application. If the application isn't
    ' running, an error occurs.
    Set s = GetObject("", "Notes.NotesSession")
    If Err.Number <> 0 Then
    NotesWasNotRunning = True
    Err.Clear ' Clear Err object in case error occurred.

    Else
    Set db = s.GETDATABASE("", "")
    Call db.OPENMAIL
    mycell = Sheet1.Cells(1, 4)
    Set doc = db.CREATEDOCUMENT
    Msg = "WSM-Marketing Package has been installed. " & Date & " " & Time & Chr(10)
    Call doc.REPLACEITEMVALUE("SendTo", "anton.water@whereever.com")
    Call doc.REPLACEITEMVALUE("Subject", "WSM-Marketing User")
    Call doc.REPLACEITEMVALUE("Body", Msg)
    Call doc.Send(False)
    Set s = Nothing
    End If
    error:
    End Sub

    What I'm trying to do is check if Notes is running before the email sends. If it tries to open Notes I get a scrambled database, it's especially a problem when your working offline as the code triggers when excel loads.

    Any assistance would be appreciated.

    Many Thanks

    AJW

  10. #20
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi AJW

    Sorry ... put you wrong .... PLEASE NOTE NOT TESTED!
    I cannot test this as I don't use Notes ... only @ Work and I rearly program @ Work.

    Code:
    Sub ConformationMail2()
    On Error GoTo error:
    Dim s As Object
    Dim db As Object
    Dim doc As Object
    
    On Error Resume Next
    ' Defer error trapping.
    ' Getobject function called without the first argument returns a
    ' reference to an instance of the application. If the application isn't
    ' running, an error occurs.
    Set s = GetObject("", "Notes.NotesSession")
    If Err.Number <> 0 Then
        MsgBox "Notes is Not Running"
        Err.Clear ' Clear Err object in case error occurred.
        Exit Sub
    Else
        UserName = s.UserName
        MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
        Set db = s.GETDATABASE("", MailDbName)
        Call db.OPENMAIL
        mycell = Sheet1.Cells(1, 4)
        Set doc = db.CREATEDOCUMENT
        Msg = "WSM-Marketing Package has been installed. " & Date & " " & Time & Chr(10)
        Call doc.REPLACEITEMVALUE("SendTo", "anton.water@whereever.com")
        Call doc.REPLACEITEMVALUE("Subject", "WSM-Marketing User")
        Call doc.REPLACEITEMVALUE("Body", Msg)
        Call doc.Send(False)
        Set s = Nothing
    End If
    
    
    error:
    End Sub
    Kind Regards,
    Ivan F Moala From the City of Sails

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com