Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    creating email message vs Outlook 2000 (sp1) (Access 97 )

    I'm using the following code to embed a word document into the body of an email, then send the email to the intended party (names have been changed accordingly). The problem is that the new service pack for Outlook 2000, in its attempt to circumvent "bad" attachments, is not happy with what we're trying to do, and this ends up in the ultimate loop 'o doom as the user tries to click the "yes" button when the explanatory "are you sure you want to send this attachment because some attachments can contain viruses" window pops up over and over and over again, until the user ctrl/alt/dels the whole process, which ends up eventually corrupting the database.

    Here's the innocent code:

    tempFilePath = CurDir
    tempFilePath = tempFilePath & "" & "Temp.txt"
    DoCmd.OpenReport "R_FcstDiff", acViewPreview

    DoCmd.OutputTo acOutputReport, "R_MickeyDiff", acFormatTXT, tempFilePath
    DoCmd.Close acReport, "R_MickeyDiff"
    fnum = FreeFile()
    'opens temporary .txt file, and inputs into the body of the email
    Open tempFilePath For Input As fnum
    FileContents = Input$(LOF(fnum), fnum)
    Close #fnum
    'set the mailrecip string (called Recipient in the sub)
    'this opens outlook for those of us who forget all the time
    If isAppRunning("outlook.application") = False Then
    Shell ("outlook.exe")
    Else
    End If
    'heres where it creates the email
    MailRecip = "minniemouse@imtrying.organza"
    MailCC1 = DLookup("mailname", "tblUser", "user <> " & """" & " " & """") & "@imtrying.organza"
    MailCC2 = " "
    MailSubj = "Adjusted Item for " & Me.PLine
    bpurge = True 'this will prevent the message from being saved in the sent items
    ' should be set to false if copy needs to be saved
    bpreview = False ' this will send the message instead of displaying it and waiting for you to send it
    'sends out email
    Call SendMail(MailSubj, FileContents, MailRecip, MailCC1, MailCC2, bpreview, bpurge)
    'deletes .txt file
    Kill tempFilePath

    I think the irritating Outlook situation is occurring when the Sendmail is called.

    Does anyone have any suggestions, other than uninstalling this service pack?

    The sysadm is sort of peeved at me. <img src=/S/bwaaah.gif border=0 alt=bwaaah width=123 height=15>
    Carpy Diem, it&#39;s .

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: creating email message vs Outlook 2000 (sp1) (Access 97 )

    Get the Redemption dll. It uses Extended MAPI to get around the so-called "draconic Outlook security update".

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: creating email message vs Outlook 2000 (sp1) (Access 97 )

    <img src=/S/smile.gif border=0 alt=smile width=15 height=15> <img src=/S/joy.gif border=0 alt=joy width=23 height=23> <img src=/S/smile.gif border=0 alt=smile width=15 height=15> <img src=/S/joy.gif border=0 alt=joy width=23 height=23>

    Sysadm is looking into this and they got all excited.

    Thanks, Hans! <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    Carpy Diem, it&#39;s .

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

    Re: creating email message vs Outlook 2000 (sp1) (Access 97 )

    Just a caution on Redemption. It works just fine with Access 97, but you must have the CDO library installed on the machine or Redemption breaks. Outlook doesn't necessary install CDO by default, so you may have to do a reinstall on a given machine to get the functionality you need, depending on the OS you're using.
    Charlotte

  5. #5
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: creating email message vs Outlook 2000 (sp1) (Access 97 )

    Thanks, Charlotte - I'll let the sysadm know. As far as I can tell, I have the correct version on my machine, but then again, being the developer, it never happens here... <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Carpy Diem, it&#39;s .

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

    Re: creating email message vs Outlook 2000 (sp1) (Access 97 )

    The problem is more likely on machines running NT, Win2k or WinXP, which don't automatically installl CDO.dll. Later versions of Outlook only install CDO.dll if you do a custom install and drill into the Outlook options to specifically select it.
    Charlotte

Posting Permissions

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