Email Automation from Access Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #16
    I would suggest going ahead and doing that anyway Gaz.

    This is a topic that comes up quite frequently one way and another. Having a fuller answer on your particular solution can only be helpful for all those others looking.

    Comment

    • GazMathias
      Recognized Expert New Member
      • Oct 2008
      • 228

      #17
      Originally posted by NeoPa
      I would suggest going ahead and doing that anyway Gaz.

      This is a topic that comes up quite frequently one way and another. Having a fuller answer on your particular solution can only be helpful for all those others looking.
      I hadn't actually read all of the posts in this thread, I now see that the OP wants the email to appear in his Outlook .pst file, which this approach obviously can't do.

      I think perhaps I'll instead write an article on the subject, and cater for both classic ASP and PHP.

      Gaz

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #18
        Sounds good.

        When done, post a link in here JIC. Remember, there will be other searchers than simply the OP and a link to alternatives won't hurt as long as it's clear that it's not a specific answer to the question.

        Comment

        • tdw
          New Member
          • Mar 2007
          • 206

          #19
          NeoPa, regarding your suggestion to split the code into logical procedures... I can't seem to find information about that. I know I said I'd ask about it in another thread if I needed to, and I still will if I end up needing direct guidance.

          For now though, could you point me in a direction where I can find out about this on my own? Thanks

          Comment

          • topher23
            Recognized Expert New Member
            • Oct 2008
            • 234

            #20
            Originally posted by tdw
            NeoPa, regarding your suggestion to split the code into logical procedures... I can't seem to find information about that. I know I said I'd ask about it in another thread if I needed to, and I still will if I end up needing direct guidance.

            For now though, could you point me in a direction where I can find out about this on my own? Thanks
            I'm guessing what NeoPa meant was that you should take all of your code from the Dim statements regarding Outlook to the statements setting the Outlook variables to nothing and move them to a new procedure - call it something like Sub Send2Outlook(). Then call it from the original procedure, like so -

            If Response = vbYes then Send2Outlook

            Splitting things up this way makes your code easier to read and can help with error tracking and debugging.

            That about right, NeoPa?

            P.S., DoCmd.RunComman d (command) is an easier and more intuitive way to manipulate your records than DoCmd.DoMenuIte m. For instance, to delete the current record, use "DoCmd.RunComma nd acCmdDeleteReco rd." Check the VBA Help file for more on RunCommand.

            Comment

            • tdw
              New Member
              • Mar 2007
              • 206

              #21
              So, I would just cut and paste the code into a new procedure. Would that mean a seperate module? Or somewhere within the form module?

              As far as the delete record... I used to have it the way you suggested but then changed it. I can't for the life of me remember why.

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32633

                #22
                Originally posted by topher23
                I'm guessing what NeoPa meant was ...
                That's about the size of it Topher :)

                I had this thread pending to give a fuller explanation when I got some time, but that's certainly the gist of it.

                Separate procedures can either be created in the same (form's) module or defined as Public in a general module (not attached to a particular object). Determining which is the more appropriate approach comes down to where and when the procedure will ever be called from.

                If it's general purpose code then the general module would be the choice. If it's only for use within that particular object (form or whatever) then the form's module would be.

                PS. You're also correct in that it is generally better policy to avoid use of commands which are menu relative. Especially as they are so hard to read and interpret.

                Comment

                • tdw
                  New Member
                  • Mar 2007
                  • 206

                  #23
                  Makes sense. I think in this case a procedure within the form's module would be most appropriate. I'll give it a try.

                  Comment

                  • tdw
                    New Member
                    • Mar 2007
                    • 206

                    #24
                    I have the email thing working fine on my computer. However on another computer (my boss's) it just doesn't work. No error message or anything, it just doesn't open a new email message at all. Outlook is installed on his computer, and it is set as his default email program.

                    Any ideas what might be different on his computer than on mine?

                    Comment

                    • NeoPa
                      Recognized Expert Moderator MVP
                      • Oct 2006
                      • 32633

                      #25
                      That's a bit of an open-ended question, but I'd look at any security settings you can. Also look at options set in the Access and Outlook clients.

                      Comment

                      • tdw
                        New Member
                        • Mar 2007
                        • 206

                        #26
                        I was afraid that would be the case. I've looked at all of those basic security and other settings that I can think of.
                        I apologize about the question being open ended, but the problem, so far as I can tell, is probably something just that simple. Just can't find it.

                        However, I also wondered if it's some kind of reference library problem. I looked at all that and it looks fine too.

                        Just at a loss.

                        Comment

                        • NeoPa
                          Recognized Expert Moderator MVP
                          • Oct 2006
                          • 32633

                          #27
                          Don't feel bad. That's just the situation you're in (not a pleasant one).

                          It's like taking the register for absentees though - Hands up those that are missing today.

                          Also, just because I can't help further - doesn't mean no-one can necessarily. What you've already said so far may register with someone as a problem they're familiar with. Not me though, I'm afraid.

                          Comment

                          • tdw
                            New Member
                            • Mar 2007
                            • 206

                            #28
                            Yes that is a good way of describing it. That someone has encountered this before and happens to see the question is all I can hope for. I think I've Googled it all I can at this point.

                            Comment

                            • topher23
                              Recognized Expert New Member
                              • Oct 2008
                              • 234

                              #29
                              Thought I'd do a follow-up on my code here for Outlook 2007. It looks like MS pulled the "Office" out of it in the name tagline, so in line 7 of the code you'd change "Microsoft Office Outlook" to "Microsoft Outlook" - also, the same for Outlook 2000.

                              Comment

                              Working...