Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What line does the debugger hit?

    Try changing the Set olApp line to:

    Set olApp = CreateObject("Outlook.Application")
    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.

  2. #17
    imran688 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    This error pops up after launching Outlook

  3. #18
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Np, thanks again June, your corrections worked!

  4. #19
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    But what line is the debugger highlighting? Did you try the suggested code edit?

    Is this code behind form?

    You call the sub CreateHTMLMail but I don't see any HTML in this procedure. HTML code tags would be used to create an HTML formatted body. HTML tags can apply formatting for bold, underscore, font, tabulated, etc.
    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.

  5. #20
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Quote Originally Posted by June7 View Post

    You call the sub CreateHTMLMail but I don't see any HTML in this procedure. HTML code tags would be used to create an HTML formatted body. HTML tags can apply formatting for bold, underscore, font, tabulated, etc.
    Thats my fault, I stripped the code down for this user. In my application all mail variables are determined by html on a webpage. I am pretty sure he wants to be able to fill out everything in this email from form text boxes... Maybe he can post mdb? I'd take a look at it .

  6. #21
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I guess we are at the point will have to analyze db directly, because don't see anything else that would be an issue in the code.

    Follow instructions at bottom of my post to provide db.
    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. #22
    imran688 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30

    Unhappy

    Here is a simple database with one table and one form. I want to send email if i click on the button Send Email on the form. Please help.
    Attached Files Attached Files

  8. #23
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Reference the form name, not Detail section:

    .Subject = Forms("Orders").EmailSubject
    .Body = Forms("Orders").EmailMessage
    .To = Forms("Orders").EmailTo

    OR

    .Subject = Me.EmailSubject
    .Body = Me.EmailMessage
    .To = Me.EmailTo
    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.

  9. #24
    imran688 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    Still same issue. runtime error 438 "Object does not support this property or method". I have attached the database, can you please make it work in that?

  10. #25
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Misspelling, missing 'e':

    Set objMail = olApp.CreateItem(olMailItem)
    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.

  11. #26
    imran688 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    30
    It works perfectly. Thank you very much guys.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Automated Data Collection Through Email Trouble
    By drexasaurus in forum Import/Export Data
    Replies: 4
    Last Post: 10-17-2014, 12:39 PM
  2. Automated Email Notification
    By sai_rlaf in forum Access
    Replies: 5
    Last Post: 12-07-2011, 06:33 PM
  3. automated email sent from records in form
    By hmcquade in forum Forms
    Replies: 2
    Last Post: 05-23-2011, 08:45 AM
  4. Automated email from access
    By jfuller in forum Access
    Replies: 3
    Last Post: 04-11-2011, 02:56 PM
  5. Replies: 1
    Last Post: 03-02-2010, 10:51 AM

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