Results 1 to 5 of 5
  1. #1
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Email function works perfectly for me - but not on another computer

    Hello all,



    The email code below works perfectly for me, but not on my clients' computers. What am I missing? All references are set correctly. Using Windows 7 and 8, Office 365 (Access 13). Sorry for the lack of indenting. TIA.

    Code:
    Dim stDocName As String
    Dim MyPath As String
    MyPath = "C:\abc moving\documents\" & Me.reportname
    stDocName = "ConfirmationReport"
    DoCmd.OutputTo acReport, stDocName, acFormatPDF, MyPath, True
     
    Dim db As DAO.Database
    Dim MyOutlook As Outlook.Application
    Dim MyMail As Outlook.MailItem
    Dim Subjectline As String
     
    Set appOutLook = CreateObject("Outlook.Application")
    Set MailOutLook = appOutLook.CreateItem(olMailItem)
    With MailOutLook
     
    Subjectline$ = "Thank you for choosing ABC Moving" Set db = CurrentDb() .To = Forms!moveinformation!EmailAddress .SentOnBehalfOfName = "chris@abcmoving.com" If Me.EmailAddress2 <> "" Then .BCC = Forms!moveinformation!EmailAddress2 End If .Subject = Subjectline$ If Me.TravelMove = True Then MyMail.HTMLBody = DLookup("travelmessage", "emailmessages") Else MyMail.HTMLBody = DLookup("morningmessage", "emailmessages") End If
    .Attachments.Add ("c:\abc moving\documents\Boxes and Packing Supplies.pdf") .Attachments.Add ("c:\abc moving\documents\Home Packing Tips.pdf") .Attachments.Add ("c:\abc moving\documents\insurance and agreement.pdf") .Attachments.Add MyPath
    .Display End With End Sub

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    Not clear what you mean by 'The email code below works perfectly for me, but not on my clients' computers'?

    do you get an error message?, nothing happens? system freezes?

    what happens when you step through the code on your client's computer?

    Are they also using Office 365? If not, you either need to use late binding or set a reference to their version, not yours

    do they have the directory "C:\abc moving\documents\"?

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    perhaps they do not have: MyPath = "C:\abc moving\documents\"

    and their outlook client is identical?

  4. #4
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Quote Originally Posted by Ajax View Post
    Not clear what you mean by 'The email code below works perfectly for me, but not on my clients' computers'?

    do you get an error message?, nothing happens? system freezes?

    what happens when you step through the code on your client's computer?

    Are they also using Office 365? If not, you either need to use late binding or set a reference to their version, not yours

    do they have the directory "C:\abc moving\documents\"?
    Sorry - took a bit to collect this information. Yes, they are on Office 365. Yes they have the appropriate directory. Nothing happens following output of the letter. Outlook does not open.

    Thank you for taking time to respond!

  5. #5
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    they have the correct directory. The only difference in their email vs. mine is they use Exchange. (Still Outlook though).

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 12-05-2013, 06:04 PM
  2. Code Runs Perfectly... Every other time.
    By offie in forum Programming
    Replies: 5
    Last Post: 08-14-2013, 03:45 PM
  3. Replies: 21
    Last Post: 06-25-2013, 09:22 AM
  4. Replies: 4
    Last Post: 11-29-2012, 12:45 AM
  5. Replies: 1
    Last Post: 05-25-2012, 10:36 AM

Tags for this Thread

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