+ Reply to Thread
Results 1 to 8 of 8

Sending Excel through email using Lotus Notes

  1. #1
    mridzuan
    Guest

    Sending Excel through email using Lotus Notes

    Hi everybody,

    This is part of the code for sending email from Excel. I obtained this from Ron De Bruin.

    Set OutApp = CreateObject("Outlook.Application")
    OutApp.Session.Logon
    Set OutMail = OutApp.CreateItem(0)

    With Destwb
    .SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum
    On Error Resume Next
    With OutMail
    .To = "[email protected]"
    .CC = ""
    .BCC = ""
    .Subject = "This is the Subject line"
    .Body = "Hi there"
    .Attachments.Add Destwb.FullName
    'You can add other files also like this
    '.Attachments.Add ("C:\test.txt")
    .Send 'or use .Display
    End With
    On Error GoTo 0
    .Close SaveChanges:=False
    End With

    'Delete the file you have send
    Kill TempFilePath & TempFileName & FileExtStr

    Set OutMail = Nothing
    Set OutApp = Nothing

    I think the code won't work with Lotus Notes. Can anyone help me with this?

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mridzuan
    Hi everybody,

    This is part of the code for sending email from Excel. I obtained this from Ron De Bruin.

    Set OutApp = CreateObject("Outlook.Application")
    OutApp.Session.Logon
    Set OutMail = OutApp.CreateItem(0)

    With Destwb
    .SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum
    On Error Resume Next
    With OutMail
    .To = "[email protected]"
    .CC = ""
    .BCC = ""
    .Subject = "This is the Subject line"
    .Body = "Hi there"
    .Attachments.Add Destwb.FullName
    'You can add other files also like this
    '.Attachments.Add ("C:\test.txt")
    .Send 'or use .Display
    End With
    On Error GoTo 0
    .Close SaveChanges:=False
    End With

    'Delete the file you have send
    Kill TempFilePath & TempFileName & FileExtStr

    Set OutMail = Nothing
    Set OutApp = Nothing

    I think the code won't work with Lotus Notes. Can anyone help me with this?
    Hi,

    the code does specify

    Set OutApp = CreateObject("Outlook.Application")

    so I would doubt that it would.

    Are you aware of 'Notes Forums ?

    perhaps http://www.experts-exchange.com/Appl..._21829026.html

    is what you need?

    or http://www-128.ibm.com/developerworks/lotus/community/

    ---
    Last edited by Bryan Hessey; 01-14-2007 at 10:17 PM.
    Si fractum non sit, noli id reficere.

  3. #3
    mridzuan
    Guest
    I've have this code from http://www.ozgrid.com/forum/showthread.php?t=53713 that will work as I wish:

    Please Login or Register  to view this content.
    However, I have this small problem. This code sends the email immediately. I wanted to view them first and send them manually. for Outlook, I can use .Display but I don't know the same code to be used for Notes. I would be very grateful if anybody can help.

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mridzuan
    I've have this code from http://www.ozgrid.com/forum/showthread.php?t=53713 that will work as I wish:

    Please Login or Register  to view this content.
    However, I have this small problem. This code sends the email immediately. I wanted to view them first and send them manually. for Outlook, I can use .Display but I don't know the same code to be used for Notes. I would be very grateful if anybody can help.
    Hi,

    found on another site was the suggestion
    Please Login or Register  to view this content.
    followed by the comment "then delete the send and the save to sent folder or the save to draft folder...this will just bring it up for you to see"

    but the setup for the mail was a little different to yours.

    does this help you?

    ---

  5. #5
    mridzuan
    Guest
    Don't seem to work. Can you point me to the site so that I can view the whole code?

  6. #6
    mridzuan
    Guest
    It doesn't work. Maybe I'm missing some other codes that related to it. Would be grateful if you could point to me the site where you got the code from so that I can view them and figure it out.

  7. #7
    mridzuan
    Guest
    Actually, I tried it again and it does work. Thanks

  8. #8
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mridzuan
    Actually, I tried it again and it does work. Thanks
    fantastic, I have failed thus far to locate the site that came from, so was still in 'search' mode, but great to see that you managed to get it working, and thanks for the feedback.

    ---

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1