[AccessD] Automating Outlook from Access

Daniel Waters df.waters at outlook.com
Sun Aug 22 19:35:53 CDT 2021


Hi John,

Polling is, as you said, just checking periodically to see if 'something' has happened.

If the action people take on your web site results in an email being sent to a running instance of Outlook (also on the server?), then I think you're all set.  

But more typically, pushing a button on a web site results in a database table on the server that supports the web site will then have another 'I want to buy it' record.  From there that new record will need to become 'known' by the running instance of Outlook.  And that's where Polling comes in.  The Polling would be Outlook looking for any new records in that table at a determined time interval (10 minutes?).  And then taking action on those buy requests.  But you don't need this.

Because when an email comes in you have written the code for that email to be collected by Outlook automatically, you don't need to Poll a database table to search for new buy requests.

To change the time interval for Polling your Outlook inbox, go to File | Options | Advanced | Send/Receive.  In the window that opens, check 'Schedule an automatic send/receive every 'X' minutes.'  If Outlook is on your server you may as well make that 1 minute.  

IOW - Polling is being active, while you've written your system to be reactive and w/o human intervention.

Sounds impressive!  Hope you can keep us all up to date on your progress.

Dan


-----Original Message-----
From: AccessD [mailto:accessd-bounces+df.waters=outlook.com at databaseadvisors.com] On Behalf Of John Colby
Sent: 22 August, 2021 15:12
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Automating Outlook from Access

This is not an Amazon site selling 100K pieces of junk a week.  This is a
custom written app for a very specific market, with very specific
professionals buying it.  The app is very specific and solves regulatory
requirements for these professionals.

The total market size is under 100K.  I expect an upside down bathtub sales
curve.  Once a person buys one, it will auto renew, and / or emails
soliciting renewal.

I want the whole thing to be email driven.  All the professionals use
Microsoft Office, that is a known.  I expect to email an attached database
initially, with an email license extension key when they renew.  I expect
to automate Outlook on their end as well such that the key comes in, I
intercept it and process the key.

I will "poll" a server if I must but I don't see that as an attractive
design.  So far, Outlook automation has worked a treat.  Emails come in, an
event is raised by Outlook, it is hooked by Access, and everything relative
to that order just happens.  Within seconds of pressing buy on the sales
server an email is on the way.  Outlook collects it's mail periodically (is
that polling?)

I don't understand the fascination with Polling.  We (citizens) get dozens
or hundreds of emails every single day.  Email is a known, old, well oiled
technology.  Our company owns the sales server, I personally own (wrote)
the dedicated email receiver program processing the orders, we own the
dedicated email address, we own the custom app that is being sold.

If what I am doing works, then 98% of sales will be handled entirely
automatically, programmatically.  Shipping is by email attachment.  License
renewals is by email.  Sales is via the web site.

So tell me why Polling is superior?  So far every single person replying
has suggested polling.
There must be some reason it is the preferred strategy.  I'm baffled.🤔


On Sun, Aug 22, 2021 at 10:52 AM Jim Dettman via AccessD <
accessd at databaseadvisors.com> wrote:

> << Yep.  Until the web site goes down, the database corrupts, gets
> hacked,  or
> a million other problems that web sites have.>>
>
>  Well if any of that is true, you probably are not going to get an e-mail
> anyway.
>
>  I don't think I'd be relying on receiving an e-mail.   But that's me and
> as you say, there are a bunch of ways to do this.
>
> Jim.
>
> -----Original Message-----
> From: AccessD On Behalf Of John Colby
> Sent: Saturday, August 21, 2021 7:37 PM
> To: Access Developers discussion and problem solving <
> accessd at databaseadvisors.com>
> Subject: Re: [AccessD] Automating Outlook from Access
>
> Yep.  Until the web site goes down, the database corrupts, gets hacked,  or
> a million other problems that web sites have.
>
> My intent is that a client makes a purchase and a few minutes later his
> purchase pops into his mail box.  An easy (for me) way to do that is
> receive an order email from my server every time an order is placed.
>
> A lot of folks aren't comfortable with classes, so if that is the case
> there are a dozen ways to skin a cat.  I have automated Office for 25
> years, excel, word, Access itself, and now outlook.  If that is "my only
> tool" ... I guess I'll have to ask Microsoft why they bothered giving us
> events and event driven programming. Or are we referring to using classes?
> Hmmm I'll ask Microsoft why every object in every office app is a class.
>
> I suppose I could use power shell and poll the database.... "Real men" and
> all that!🤔😎
>
> Believe it or not I used to do extensive programming in DR Dos back in the
> day.  Turbo Pascal for many years before that.  Zapple basic back in 1977.
> Ahhh the good old days.  RTos on a Z80 sbc for a few years in the 90s.  C#
> automating SQL Server for several years in the 2010 time frame.
>
> Well, hmmm, not sure what "my only tool" is but I am not a carpenter, so a
> hammer is highly unlikely.😁
>
> On Sat, Aug 21, 2021 at 1:57 PM <dw-murphy at cox.net> wrote:
>
> > If the only tool you have is a hammer, you will start treating all your
> > problems like a nail.
> >
> > Would be much easier to just query the web database from Access and do
> the
> > required processing.
> >
> > Doug
> > -----Original Message-----
> > From: AccessD <accessd-bounces+dw-murphy=cox.net at databaseadvisors.com>
> On
> > Behalf Of Jim Dettman via AccessD
> > Sent: Saturday, August 21, 2021 5:43 AM
> > To: 'Access Developers discussion and problem solving'
> > <accessd at databaseadvisors.com>
> > Cc: Jim Dettman <jimdettman at verizon.net>
> > Subject: Re: [AccessD] Automating Outlook from Access
> >
> >
> >  Actually, sounds like the long way around; the web site doesn't offer an
> > API?
> >
> >  Scraping info from e-mails can be problematic, especially if you are not
> > in
> > control of the message format.
> >
> > Jim.
> >
> > -----Original Message-----
> > From: AccessD On Behalf Of John Colby
> > Sent: Saturday, August 21, 2021 8:21 AM
> > To: Access Developers discussion and problem solving
> > <accessd at databaseadvisors.com>
> > Subject: [AccessD] Automating Outlook from Access
> >
> > I am working on an app to process orders for a program.  A web site takes
> > an
> > order, accepts payment, then sends an email containing the order info.
> > I need to receive the email, put email info into an email table, parse
> the
> > order info out of the email body, put the order into an Order table, pull
> > client info out of the order, place the client info into a client table,
> > then go back and tie the email and order to the client via a client id.
> >
> > All of the outlook automation I learned from my best friend Google.  I'll
> > write up how I am doing this stuff for anyone interested. I am not an
> > expert
> > and so any suggestions for how to do it better is good.  I will write a
> > handful of emails to detail the parts and pieces.  This is actual code I
> am
> > using
> >
> > In order to automate Outlook I need to sink Outlook events as email comes
> > in
> > which requires a class.  I create a plain old module to hold pointers to
> > the
> > Outlook class:
> >
> > Option Compare Database
> > Option Explicit
> >
> > Private mclsOutlook As clsOfficeOutlook
> >
> > Function cOl() As clsOfficeOutlook
> >     If mclsOutlook Is Nothing Then
> >         Set mclsOutlook = New clsOfficeOutlook
> >     End If
> >     Set cOl = mclsOutlook
> > End Function
> >
> > Function cOlTerm()
> >     Set mclsOutlook = Nothing
> > End Function
> >
> > --
> > John W. Colby
> > Colby Consulting
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> John W. Colby
> Colby Consulting
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
John W. Colby
Colby Consulting
-- 
AccessD mailing list
AccessD at databaseadvisors.com
https://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list