Results 1 to 12 of 12
  1. #1
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Send Object Using Outlook (A2k SR1)

    I am using the Send Object command to send selected reports using Outlook. The below code is used to attach a report to an Outlook email. This works great however, the user must press the send key in Outlook to send the report after it is attached. Thus, we can only send one report at a time.

    Code to send a report to outlook is below:

    Dim stDocName As String
    Dim ToName As String
    Dim CCName As String
    Dim SubName As String 'Subject


    ToName = "'" & Forms!FilterForReport!SelectCustodian & "'"
    CCName = "'Smith, John'"
    SubName = ConvertName([Review]) & " Government Property TEST"

    stDocName = "ReportMailToCustodian"
    DoCmd.SendObject acSendReport, stDocName, acFormatRTF, ToName, CCName, , SubName

    Some questions:
    1. Is it possible to send the report without the user having to have to press the send key in Outlook? How? - perhaps using sendkeys??

    Thanks in advance.
    Regards,

    Gary
    (It's been a while!)

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Send Object Using Outlook (A2k SR1)

    Excuse my ignorance, but why are you enclosing the TO field in single quotes?
    Isn't a patch required to enable outlook to send this automatically? I seem to remember something about that in the lounge searches.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  3. #3
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Send Object Using Outlook (A2k SR1)

    Did you try specifying False for EditMessage argument? The default is True. According to "Help":
    <blockquote><hr>EditMessage Optional Variant. Use True (

  4. #4
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Send Object Using Outlook (A2k SR1)

    You Said << ..but why are you enclosing the TO field in single quotes?>>

    ... Because this is the only way I could get the field to send. Our IT department controls what patches, versions, etc., of all software being used. I know that they have not loaded all patches for reasons unknown to me. (I never do understand what they are really doing anyway...) In either event, the way shown is the only way I could get the email to outlook to work with our current system.
    Regards,

    Gary
    (It's been a while!)

  5. #5
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Send Object Using Outlook (A2k SR1)

    Thanks Mark,

    Didn't think of that and will give it a try. The links were extremely helpful and will be used for coding another database where I need to send a number of emails out automatically.

    Thanks again. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Regards,

    Gary
    (It's been a while!)

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Send Object Using Outlook (A2k SR1)

    You might want to look at previous discussions for mentions of the Redemption product as well. However, if your IT department controls what goes on the machines that tightly, getting them to approve of Redemption might be a struggle. It would be worth winning though, because it avoids the security problems that plague MAPI calls and doesn't trigger those annoying confirmation message boxes.
    Charlotte

  7. #7
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Send Object Using Outlook (A2k SR1)

    Thanks Charlotte,

    I will take a look at this product. However, I doubt that the IT department would allow it to be on our machines (They are locked down that tightly). But I may just give it a try.
    Regards,

    Gary
    (It's been a while!)

  8. #8
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Send Object Using Outlook (A2k SR1)

    I just did quick test here at work where we have use Outlook/Exchange Server for our e-mail & SendObject sent msg & attachment "automatically" when "False" was specified for EditMessage argument - as long as I already had an Outlook session open. (Surprisingly, considering all the security patches, etc they have installed here.) But if Outlook was not open, a dialog box requesting you to select a User Profile popped up (see attd image). So that's another factor to take into account if applicable to your situation.

    HTH
    Attached Images Attached Images

  9. #9
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Send Object Using Outlook (A2k SR1)

    Mark,

    Thanks for that. One of the requirements in the database using Outlook is that a session of Outlook must first be open on the computer running the database for the email feature to work.

    Another item is that the Table storing Employee names requires a reference, i.e., Last Name, First Name that matches exactly with Outlook so the name passes to outlook without error.

    -- Any quick ways of getting the master listing of email names out of Outlook to match to the access table?
    Regards,

    Gary
    (It's been a while!)

  10. #10
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Send Object Using Outlook (A2k SR1)

    You can try using the Import or Link Exchange/Outlook Wizard to link or import Outlook or Exchange folders and address books (including the Global Address Listing (GAL)) and use this data to verify recipient names. You can link/import folders that reside either on the server or local hard drive. I never had much luck with this, our mail servers have 1000's of names & the connection is so slow as to be unusable for any practical purpose. In one program where we use automated mass e-mailings (using Automation with Outlook) the personnel table simply has an e-mail field where the employee's e-mail address is entered (in SMTP format) & this field used for "automated" e-mail purposes. This was simpler than trying to resolve recipient addresses on the fly in Outlook.

  11. #11
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Send Object Using Outlook (A2k SR1)

    Thanks Mark,

    I am new to linking with Outlook and learning as I go. Sooo much to learn in too little time. <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15>
    Regards,

    Gary
    (It's been a while!)

  12. #12
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Send Object Using Outlook (A2k SR1)

    That's strange, I have never had to do that (enclose the To or CC or BCC fields in Single quotes) !!

    Pat <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

Posting Permissions

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