Page 3 of 3 FirstFirst 123
Results 31 to 38 of 38
  1. #31
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,914
    Need the period in front of Attachments.



    .Attachments.Add

    Now I see your original code is missing that.
    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. #32
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    Still the same issue I am running Office 2013, would that make a difference? Do I need to check something in the VBA Tools Refrence Library?

    I took out the error reporting and this line is the issue:

    Code:
    strSubject = "By Field Report - " & ![Field Name] & " - " & Format(Now, "dd mmm yyyy")
    Even though I have
    Dim strSubject as String

  3. #33
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,914
    Yes, need the Outlook Object Library.

    I would expect different error messages if the library is not selected.
    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.

  4. #34
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    I have the MS Outlook library selected.

    I fixed the string issue by putting a ' after the second "

    strSubject = "By Field Report - " ' & ![Field Name] & " - " & Format(Now, "dd mmm yyyy")

    This is not what I want though. I would like all of it Report Name - Section - Date. It works with the SendObject.

    Once this was "fixed" I got an error on the .Send

    I would like to hit send myself, and have the window pop open. No Email windows opened.

  5. #35
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,914
    That apostrophe makes no sense. It should error.

    Instead of .Send, .Display
    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.

  6. #36
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    The .Display worked. I just took out all the extra with the " to make it look like a comment. Then it ran. The .Display worked well, but the subject remained blank, the signature block was correct. The file was not deleted after the send though.

  7. #37
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,914
    Okay, I get what the apostrophe was doing.

    The variables should work.

    The .Delete works for me with the .Send.

    The .Subject and .Body lines are commented in your code. Don't see a .To line.
    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.

  8. #38
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    Probably the delete doesn't work since I manual send. Thats OK by me as I have found out the add attachement will pick up the specific file needed regardless of other files in that folder.

    I didn't add a .To line as I will use outlooks address book. I have to manualy select the adressee's since it is always changing.

    I figured out the blank subject issue by changing the strSubject to .Subject and changing ![Field Name] to Me.[Field Name]

    Mucho Gracias

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

Similar Threads

  1. Replies: 2
    Last Post: 03-16-2014, 02:12 PM
  2. sending email with attachment of certain file.
    By joshynaresh in forum Access
    Replies: 1
    Last Post: 02-13-2014, 05:16 AM
  3. sending specific details to pdf and email
    By blappy347 in forum Import/Export Data
    Replies: 1
    Last Post: 03-29-2013, 12:46 PM
  4. Combining 'sending mail' with 'sending a report'.
    By Mattbro in forum Programming
    Replies: 2
    Last Post: 11-25-2012, 07:42 AM
  5. Sending excel file in an email
    By Jim.H. in forum Access
    Replies: 1
    Last Post: 01-29-2012, 12:56 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