Page 3 of 3 FirstFirst 123
Results 31 to 44 of 44
  1. #31
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Attachment 14731

    my references

  2. #32
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    Something just dawned on me. The only thing late binding is going to do is allow for different versions of Outlook to work. It helps only when you need it to work on machines with Outlook installed.
    so don't bother with late binding?

  3. #33
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    Can you try on another computer, another system, home computer, work computer?

    The code works for me. Am on home computer now.

    Did you use an actual email address in your code? I send to myself.

    I tested with and without (I was surprised this worked) library reference. With Outlook open or closed.
    different systems, windows etc same result

  4. #34
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Couldn't I do a check first to see if the user has Outlook before running the code for the users without outlook to prevent errors?

  5. #35
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    I feel as though I am goofing things up. I definitely was and may still be confused about what you are trying to accomplish. If you want to send emails you can use CDO. If you need return receipt, I do not believe that will work with CDO. I will look for a schema though.

    That leaves you with Outlook. If the machines are going to have different versions of Outlook, ie 2003, 2010, 2013, then use late binding.

  6. #36
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    I think it is possible to check if Outlook installed but might be easier just to trap the error with error handler.

    Also, might find this interesting http://www.cpearson.com/Excel/EMail.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #37
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    I feel as though I am goofing things up. I definitely was and may still be confused about what you are trying to accomplish. If you want to send emails you can use CDO. If you need return receipt, I do not believe that will work with CDO. I will look for a schema though.

    That leaves you with Outlook. If the machines are going to have different versions of Outlook, ie 2003, 2010, 2013, then use late binding.


    Yeah since I can't use CDO I will have to use outlook and just not reference the library for some of the users' front end - I can go back to trying to get outlook to work without the late binding as that doesn't seem to be working for me

  8. #38
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    I think it is possible to check if Outlook installed but might be easier just to trap the error with error handler.

    Also, might find this interesting http://www.cpearson.com/Excel/EMail.aspx
    The problem I see with CDO

    no read receipt
    no sent box

    If I was using it I would use CDO but the requirements set by management make CDO not an option

  9. #39
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Then we are back to the mystery of why the code works for us but not you.

    It's looking like error handler best way to deal with absence of Outlook.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #40
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Well, I got CDO to send a return receipt but if I use Bcc it will ask for two return receipts. This would be confusing to the user. I say Bcc, because there is no way for CDO to place the message in the sent folder. Of course, there probably is a way. I just don't know if it is worth it. Could be interresting to try though.

  11. #41
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    I think what you have will work. I tested the following and it worked for me. Remove the reference to Outlook Objects in your reference library thing before you run the code.

    Code:
    Private Sub cmdTest_Click()
    
    Dim appOutLook As Object
    Dim MailOutLook As Object
    Set appOutLook = CreateObject("Outlook.Application")
    Set MailOutLook = appOutLook.CreateItem(0)
    
    With MailOutLook
        .BodyFormat = 2
        .To = "Email@Domain.com"
        ''.cc = ""
        ''.bcc = ""
        .Subject = "Subject Line"
        .HTMLBody = "This is the body of the Email"
        .DeleteAfterSubmit = False 'This would let Outlook send the note without storing it in your sent bin
        .ReadReceiptRequested = True
        .send
        
    End With
     
    End Sub
    I have this working now,

    I took out everything and am now working on the recordset

    UPDATE: Infact I know why the error was happening and I will explain later

    Dim appOutLook As Object
    Dim MailOutLook As Object
    Set appOutLook = CreateObject("Outlook.Application")
    Set MailOutLook = appOutLook.CreateItem(0)

    had to be placed just above the With MailOutlook

  12. #42
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Did you see post #40 ?

  13. #43
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    Did you see post #40 ?
    yeah - but as I am pressed for time I am going with outlook and just disabling the reference for the runtime users

  14. #44
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Thank you to you both for help with this

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Automated Email using Outlook
    By imran688 in forum Programming
    Replies: 25
    Last Post: 11-12-2012, 03:02 AM
  2. Email and Outlook
    By Douglas Post in forum Programming
    Replies: 1
    Last Post: 02-13-2012, 02:57 PM
  3. email with outlook.application
    By JJCHCK in forum Access
    Replies: 5
    Last Post: 08-25-2011, 06:19 AM
  4. Passing Email Address Into Outlook
    By cg1465 in forum Access
    Replies: 1
    Last Post: 10-01-2010, 07:59 AM
  5. Exporting Outlook email addresses
    By noidea in forum Import/Export Data
    Replies: 0
    Last Post: 08-01-2009, 01:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums