[AccessD] Withevents and object library version

Gustav Brock Gustav at cactus.dk
Fri Jan 6 05:30:30 CST 2006


Hi John

You could add Outlook as a Reference by GUID specifying Major and Minor version no.
Start from top (Outlook 2003) and continue until it doesn't fail.
Or maybe you could specify 0 for both Major and Minor and the current version will be referenced - that is how it is supposed to work, but I haven't found this method to work reliably.
Remember that the code will be left uncompiled, thus you need to recompile which is not that easy ... if you recall the old threads on this.

By why use Outlook? It's a monster. If a client doesn't use Outlook then what to do? Couldn't you just let a rule forward those mails to a known environment, then poll that at some interval? 
For a specific purpose we did that. An old 266MHz machine runs The Bat! client which polls via POP3 every five minute. If a hit exists, the mail is downloaded, the attachment saved and a batch file is called which unzips the attachment, processes it (by calling an Access app), zips the processed file and mail it - and logs it all for reference.

Not as sexy as WithEvents, I know, but it works.

/gustav


>>> jwcolby at ColbyConsulting.com 05-01-2006 23:58 >>>
I am starting dev on a little app to strip attachments off of outlook emails
and file them on the disk.  In order to do this I have to grab an instance
of outlook and sink events for it (emails hitting a sub-folder).

My issue is that of all the Office applications, Outlook is the ONE app that
the Office install only allows you to keep a single version of.  Thus I have
an issue developing in it since my version is 2003 and most of my clients
have 2002.  I can do everything else just using late binding but sinking
events just requires knowing the object type at compile time.

Does anyone have reliable code for determining which version of Outlook is
installed and referencing that lib at run time?  
John W. Colby
www.ColbyConsulting.com 





More information about the AccessD mailing list