SendObject Woes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jmr

    SendObject Woes

    Hi

    - I made a macro to send a report as an attachment to an e-mail in Access
    97

    - I got the macro to work on WinMe with Netscape as long as the To: field
    was not filled in.

    - I just rebuilt a Dell laptop with WinXP Professional with Outlook
    Express. I installed Access and tried the macro, but the error message
    below was the result.

    - Before rebuilding it, I had tried it with Access2002 and Outlook
    Express on WinXP and it worked fine.

    Error Message: "Microsoft Access Can't Open the Mail Session. Check Your
    Mail Application to Make Sure That It's Working Properly."
    Q283173 http://support.microsoft.com/default...b;en-us;283173

    - I tried the hyperlink mailto and it works fine on all systems:
    cmdEMail.Hyperl inkAddress = "mailto: " & Me!txtEmailName

    Has anyone else had troubles with SendObject and found a solution?
    Ideally, I want to use vba to send out a bunch of e-mails to employees
    with their pay stub as an attachment. I can make everything else work
    except the send object.
  • Tom Wickerath

    #2
    Re: SendObject Woes

    Have you tried the fix that is shown in the KB article you included as a reference?
    _______________ _______________ _______________ ___________

    "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
    news:oprxjvqwpa 4elhqh@news.via net.ca...
    Hi

    - I made a macro to send a report as an attachment to an e-mail in Access
    97

    - I got the macro to work on WinMe with Netscape as long as the To: field
    was not filled in.

    - I just rebuilt a Dell laptop with WinXP Professional with Outlook
    Express. I installed Access and tried the macro, but the error message
    below was the result.

    - Before rebuilding it, I had tried it with Access2002 and Outlook
    Express on WinXP and it worked fine.

    Error Message: "Microsoft Access Can't Open the Mail Session. Check Your
    Mail Application to Make Sure That It's Working Properly."
    Q283173 http://support.microsoft.com/default...b;en-us;283173

    - I tried the hyperlink mailto and it works fine on all systems:
    cmdEMail.Hyperl inkAddress = "mailto: " & Me!txtEmailName

    Has anyone else had troubles with SendObject and found a solution?
    Ideally, I want to use vba to send out a bunch of e-mails to employees
    with their pay stub as an attachment. I can make everything else work
    except the send object.


    Comment

    • jmr

      #3
      Re: SendObject Woes

      Yes, I followed all steps in the article, but the registry
      entry did not exist on my computer.

      On Sat, 25 Oct 2003 13:35:28 -0700, Tom Wickerath
      <AOS168RemoveTh isSpamBlock@com cast.net> wrote:
      [color=blue]
      > Have you tried the fix that is shown in the KB article you included as a
      > reference?
      > _______________ _______________ _______________ ___________
      >
      > "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
      > news:oprxjvqwpa 4elhqh@news.via net.ca...
      > Hi
      >
      > - I made a macro to send a report as an attachment to an e-mail in
      > Access
      > 97
      >
      > - I got the macro to work on WinMe with Netscape as long as the To:
      > field
      > was not filled in.
      >
      > - I just rebuilt a Dell laptop with WinXP Professional with Outlook
      > Express. I installed Access and tried the macro, but the error message
      > below was the result.
      >
      > - Before rebuilding it, I had tried it with Access2002 and Outlook
      > Express on WinXP and it worked fine.
      >
      > Error Message: "Microsoft Access Can't Open the Mail Session. Check
      > Your
      > Mail Application to Make Sure That It's Working Properly."
      > Q283173 http://support.microsoft.com/default...b;en-us;283173
      >
      > - I tried the hyperlink mailto and it works fine on all systems:
      > cmdEMail.Hyperl inkAddress = "mailto: " & Me!txtEmailName
      >
      > Has anyone else had troubles with SendObject and found a solution?
      > Ideally, I want to use vba to send out a bunch of e-mails to employees
      > with their pay stub as an attachment. I can make everything else work
      > except the send object.
      >
      >[/color]



      --
      Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

      Comment

      • Tom Wickerath

        #4
        Re: SendObject Woes

        Try creating this key as a new entry in your registry.
        _______________ _______________ _______________ ___________

        "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
        news:oprxpfbwfk 4elhqh@news.via net.ca...
        Yes, I followed all steps in the article, but the registry
        entry did not exist on my computer.

        On Sat, 25 Oct 2003 13:35:28 -0700, Tom Wickerath
        <AOS168RemoveTh isSpamBlock@com cast.net> wrote:
        [color=blue]
        > Have you tried the fix that is shown in the KB article you included as a
        > reference?
        > _______________ _______________ _______________ ___________
        >
        > "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
        > news:oprxjvqwpa 4elhqh@news.via net.ca...
        > Hi
        >
        > - I made a macro to send a report as an attachment to an e-mail in
        > Access
        > 97
        >
        > - I got the macro to work on WinMe with Netscape as long as the To:
        > field
        > was not filled in.
        >
        > - I just rebuilt a Dell laptop with WinXP Professional with Outlook
        > Express. I installed Access and tried the macro, but the error message
        > below was the result.
        >
        > - Before rebuilding it, I had tried it with Access2002 and Outlook
        > Express on WinXP and it worked fine.
        >
        > Error Message: "Microsoft Access Can't Open the Mail Session. Check
        > Your
        > Mail Application to Make Sure That It's Working Properly."
        > Q283173 http://support.microsoft.com/default...b;en-us;283173
        >
        > - I tried the hyperlink mailto and it works fine on all systems:
        > cmdEMail.Hyperl inkAddress = "mailto: " & Me!txtEmailName
        >
        > Has anyone else had troubles with SendObject and found a solution?
        > Ideally, I want to use vba to send out a bunch of e-mails to employees
        > with their pay stub as an attachment. I can make everything else work
        > except the send object.
        >
        >[/color]



        --
        Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/


        Comment

        • jmr

          #5
          Re: SendObject Woes

          I added the key, but I did not have any values to
          put into it. With just adding the key, the problem
          was not solved. I still get the "Microsoft Access
          Can't Open the Mail Session. Check Your Mail
          Application to Make Sure That It's Working Properly."
          error message.

          Does anyone know what values are supposed to be
          under the key?


          On Mon, 27 Oct 2003 09:20:53 -0800, Tom Wickerath
          <AOS168RemoveTh isSpamBlock@com cast.net> wrote:
          [color=blue]
          > Try creating this key as a new entry in your registry.
          > _______________ _______________ _______________ ___________
          >
          > "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
          > news:oprxpfbwfk 4elhqh@news.via net.ca...
          > Yes, I followed all steps in the article, but the registry
          > entry did not exist on my computer.
          >
          > On Sat, 25 Oct 2003 13:35:28 -0700, Tom Wickerath
          > <AOS168RemoveTh isSpamBlock@com cast.net> wrote:
          >[color=green]
          >> Have you tried the fix that is shown in the KB article you included as a
          >> reference?
          >> _______________ _______________ _______________ ___________
          >>
          >> "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
          >> news:oprxjvqwpa 4elhqh@news.via net.ca...
          >> Hi
          >>
          >> - I made a macro to send a report as an attachment to an e-mail in
          >> Access
          >> 97
          >>
          >> - I got the macro to work on WinMe with Netscape as long as the To:
          >> field
          >> was not filled in.
          >>
          >> - I just rebuilt a Dell laptop with WinXP Professional with Outlook
          >> Express. I installed Access and tried the macro, but the error message
          >> below was the result.
          >>
          >> - Before rebuilding it, I had tried it with Access2002 and Outlook
          >> Express on WinXP and it worked fine.
          >>
          >> Error Message: "Microsoft Access Can't Open the Mail Session. Check
          >> Your
          >> Mail Application to Make Sure That It's Working Properly."
          >> Q283173
          >> http://support.microsoft.com/default...b;en-us;283173
          >>
          >> - I tried the hyperlink mailto and it works fine on all systems:
          >> cmdEMail.Hyperl inkAddress = "mailto: " & Me!txtEmailName
          >>
          >> Has anyone else had troubles with SendObject and found a solution?
          >> Ideally, I want to use vba to send out a bunch of e-mails to employees
          >> with their pay stub as an attachment. I can make everything else work
          >> except the send object.
          >>
          >>[/color]
          >
          >
          >[/color]



          --
          Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

          Comment

          • Tom Wickerath

            #6
            Re: SendObject Woes

            Oops, I had not gone back to the KB article....sinc e it states to delete the key, my
            earlier suggestion to creating this key really makes no sense.

            _______________ _______________ ________

            "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
            news:oprxpt9qwi 4elhqh@news.via net.ca...

            I added the key, but I did not have any values to
            put into it. With just adding the key, the problem
            was not solved. I still get the "Microsoft Access
            Can't Open the Mail Session. Check Your Mail
            Application to Make Sure That It's Working Properly."
            error message.

            Does anyone know what values are supposed to be
            under the key?

            _______________ _______________ ________

            On Mon, 27 Oct 2003 09:20:53 -0800, Tom Wickerath
            <AOS168RemoveTh isSpamBlock@com cast.net> wrote:

            Try creating this key as a new entry in your registry.
            _______________ _______________ ________

            "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
            news:oprxpfbwfk 4elhqh@news.via net.ca...
            Yes, I followed all steps in the article, but the registry
            entry did not exist on my computer.
            _______________ _______________ ________

            On Sat, 25 Oct 2003 13:35:28 -0700, Tom Wickerath
            <AOS168RemoveTh isSpamBlock@com cast.net> wrote:

            Have you tried the fix that is shown in the KB article you included as a
            reference?
            _______________ _______________ ________

            "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
            news:oprxjvqwpa 4elhqh@news.via net.ca...

            Hi

            - I made a macro to send a report as an attachment to an e-mail in Access 97
            - I got the macro to work on WinMe with Netscape as long as the To: field was not
            filled in.

            - I just rebuilt a Dell laptop with WinXP Professional with Outlook
            Express. I installed Access and tried the macro, but the error message
            below was the result.

            - Before rebuilding it, I had tried it with Access2002 and Outlook
            Express on WinXP and it worked fine.

            Error Message: "Microsoft Access Can't Open the Mail Session. Check Your Mail Application
            to Make Sure That It's Working Properly."Q2831 73


            - I tried the hyperlink mailto and it works fine on all systems:
            cmdEMail.Hyperl inkAddress = "mailto: " & Me!txtEmailName

            Has anyone else had troubles with SendObject and found a solution?
            Ideally, I want to use vba to send out a bunch of e-mails to employees
            with their pay stub as an attachment. I can make everything else work
            except the send object.


            Comment

            • jmr

              #7
              Re: SendObject Woes

              Here's the scoop

              I tried to install a mapi compliant email program,
              eudora 6, but the error still came up.
              Next I installed Outlook from the Office 97 disk
              and the error is gone, but now I have to figure out
              Microsoft Exchange, but when I try to get the
              Microsoft knowledge base article on that, the
              knowledge base search page is down.

              I may have to install Microsoft Exchange or other
              stuff, but I will tackle that later in the day.

              Thanks for all your ideas.

              On Mon, 27 Oct 2003 19:33:30 -0800, Tom Wickerath
              <AOS168RemoveTh isSpamBlock@com cast.net> wrote:
              [color=blue]
              > Oops, I had not gone back to the KB article....sinc e it states to delete
              > the key, my
              > earlier suggestion to creating this key really makes no sense.
              >
              > _______________ _______________ ________
              >
              > "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
              > news:oprxpt9qwi 4elhqh@news.via net.ca...
              >
              > I added the key, but I did not have any values to
              > put into it. With just adding the key, the problem
              > was not solved. I still get the "Microsoft Access
              > Can't Open the Mail Session. Check Your Mail
              > Application to Make Sure That It's Working Properly."
              > error message.
              >
              > Does anyone know what values are supposed to be
              > under the key?
              >
              > _______________ _______________ ________
              >
              > On Mon, 27 Oct 2003 09:20:53 -0800, Tom Wickerath
              > <AOS168RemoveTh isSpamBlock@com cast.net> wrote:
              >
              > Try creating this key as a new entry in your registry.
              > _______________ _______________ ________
              >
              > "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
              > news:oprxpfbwfk 4elhqh@news.via net.ca...
              > Yes, I followed all steps in the article, but the registry
              > entry did not exist on my computer.
              > _______________ _______________ ________
              >
              > On Sat, 25 Oct 2003 13:35:28 -0700, Tom Wickerath
              > <AOS168RemoveTh isSpamBlock@com cast.net> wrote:
              >
              > Have you tried the fix that is shown in the KB article you included as a
              > reference?
              > _______________ _______________ ________
              >
              > "jmr" <jmr1.DelT_his@ DelT_his.vianet .ca> wrote in message
              > news:oprxjvqwpa 4elhqh@news.via net.ca...
              >
              > Hi
              >
              > - I made a macro to send a report as an attachment to an e-mail in
              > Access 97
              > - I got the macro to work on WinMe with Netscape as long as the To:
              > field was not
              > filled in.
              >
              > - I just rebuilt a Dell laptop with WinXP Professional with Outlook
              > Express. I installed Access and tried the macro, but the error message
              > below was the result.
              >
              > - Before rebuilding it, I had tried it with Access2002 and Outlook
              > Express on WinXP and it worked fine.
              >
              > Error Message: "Microsoft Access Can't Open the Mail Session. Check Your
              > Mail Application
              > to Make Sure That It's Working Properly."Q2831 73
              > http://support.microsoft.com/default...b;en-us;283173
              >
              > - I tried the hyperlink mailto and it works fine on all systems:
              > cmdEMail.Hyperl inkAddress = "mailto: " & Me!txtEmailName
              >
              > Has anyone else had troubles with SendObject and found a solution?
              > Ideally, I want to use vba to send out a bunch of e-mails to employees
              > with their pay stub as an attachment. I can make everything else work
              > except the send object.
              >
              >[/color]



              --
              Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

              Comment

              • Kevin Chambers

                #8
                Re: SendObject Woes

                I've been having problems with SendObject not working with Mozilla Mail. I
                scrapped together this code, which is a suitable drop-in replacement for my needs.

                This is based on code I found here:


                KC
                ----------------------------------------------------------------------

                Function SendEmail(AddrT o, Optional AddrCc, Optional AddrBcc, _
                Optional Subject, Optional Body, Optional ByVal Attachments)
                Dim objSession As Object, objMessage As Object
                Dim i As Integer, n As Integer, Addr
                On Error GoTo error_sendMsg

                Set objSession = CreateObject("M SMAPI.MAPISessi on")
                Set objMessage = CreateObject("M SMAPI.MAPIMessa ges")

                objSession.Sign On
                objMessage.Sess ionID = objSession.Sess ionID
                objMessage.Comp ose
                objMessage.MsgI ndex = -1

                For n = 1 To 3
                Select Case n
                Case 1: Addr = AddrTo
                Case 2: Addr = AddrCc
                Case 3: Addr = AddrBcc
                End Select

                If Not IsMissing(Addr) Then
                If Not isBlank(Addr) Then
                If Not IsArray(Addr) Then
                Addr = Replace(Addr, ";", ",")
                Addr = Split(Addr, ",")
                End If
                For i = 0 To UBound(Addr)
                If Not isBlank(Addr(i) ) Then
                objMessage.reci pindex = objMessage.Reci pCount
                objMessage.Reci pAddress = Addr(i)
                objMessage.Reci pType = n
                objMessage.Addr essResolveUI = False
                End If
                Next i
                End If
                End If
                Next n

                If Not IsMissing(Subje ct) Then objMessage.MsgS ubject = Nz(Subject, "")
                If Not IsMissing(Body) Then objMessage.MsgN oteText = Nz(Body, "")
                If Not IsMissing(Attac hments) Then
                If IsArray(Attachm ents) Then
                For i = 0 To UBound(Attachme nts)
                If Not isBlank(Attachm ents(i)) Then
                objMessage.Atta chmentIndex = i
                objMessage.Atta chmentPathName = Attachments(i)
                End If
                Next
                ElseIf Not IsNull(Attachme nts) Then
                objMessage.Atta chmentPathName = Attachments
                End If
                End If

                objMessage.Send True
                objSession.Sign Off

                On Error GoTo 0
                SendEmail = True
                Exit Function

                error_sendMsg:
                On Error GoTo 0
                SendEmail = False
                End Function

                Function isBlank(v)
                On Error GoTo Problem
                isBlank = IsNull(v) Or v = ""
                Exit Function
                Problem:
                isBlank = True
                End Function

                -------------------------------------------------------

                jmr wrote:
                [color=blue]
                > Hi
                >
                > - I made a macro to send a report as an attachment to an e-mail in
                > Access 97
                >
                > - I got the macro to work on WinMe with Netscape as long as the To:
                > field was not filled in.
                >
                > - I just rebuilt a Dell laptop with WinXP Professional with Outlook
                > Express. I installed Access and tried the macro, but the error message
                > below was the result.
                >
                > - Before rebuilding it, I had tried it with Access2002 and Outlook
                > Express on WinXP and it worked fine.
                >
                > Error Message: "Microsoft Access Can't Open the Mail Session. Check
                > Your Mail Application to Make Sure That It's Working Properly."
                > Q283173 http://support.microsoft.com/default...b;en-us;283173
                >
                > - I tried the hyperlink mailto and it works fine on all systems:
                > cmdEMail.Hyperl inkAddress = "mailto: " & Me!txtEmailName
                >
                > Has anyone else had troubles with SendObject and found a solution?
                > Ideally, I want to use vba to send out a bunch of e-mails to employees
                > with their pay stub as an attachment. I can make everything else work
                > except the send object.[/color]

                Comment

                Working...