Hi Geoff,

On 15 April 2004 at 22:59, Geoff wrote:

> I have an Access database that contains customer details, which
> includes dates on which subscriptions are due. I contact most
> customers via e-mail. With other mail clients (e.g. Outlook) I've been
> able to use MAPI from within Access, WScript, etc. to create and send
> messages automatically and store copies of the sent messages in the
> Sent folder for the appropriate account. However, I fall over at the
> first hurdle with TB as the default MAPI client. For example, in VBA:

>   Dim objMAPI As Object
>   Set objMAPI = CreateObject("MAPI.Session")

> causes a run-time error because ActiveX can't create the object.

Just checking - have you set TB! as the default MAPI handler?

> So is it possible to use OLE Automation / ActiveX to "drive" TB in
> this way? If so, do I need to upgrade to 2.x to get that
> functionality?

You don't need 2.x for this. Utilize a DoCmd.SendObject. Since TB! is
default, it should work with no need to create a session. I've done it
in Access using VBA with TB! version 1.62 and up. If you want to see
the code, I'll be happy to send it to you. (I'm on digest so sending
me mail privately would probably be quicker.) I wrote it for a series
of work reports that needed to go to different managers where some
received only some of the reports. Anyway, it loops through a table
and sends the necessary reports. Don't know if it would make sense,
but you're welcome to it.

-- 
Regards,
Terry

Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1


________________________________________________________

http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to