Calling Outlook express from VB 
Author Message
 Calling Outlook express from VB

I have written a program in VB6 that calculates data on
items sold over the Internet.  I have a textbox called
txtBuyerEmail that contains the buyers Email Address.  What
I want is working code or a viable explanation of how to
load outlook express and place the users email from
txtBuyerEmail in outlooks
"TO:" text box.

I'd also appreciate  anyone who can show me how to take
data from an access data base or preferably from a data
report and place it into outlooks message body or for an
alternative to using outlook express altogether.

Thanks in advance.

Regards,
Vijay Bhatter, MCSD
http://www.{*filter*}ax.net/vijay



Sun, 31 Aug 2003 13:26:13 GMT  
 Calling Outlook express from VB
You can't automate Outlook Express as it doesn't support it.  You can
automate Outlook though, or use the MAPI objects

    Set objApp = CreateObject("Outlook.Application")
    Set objMail = objApp.CreateItem(0)

    objMail.Subject = Now
    objMail.Body = "Testing"
    objMail.Send
    Set objMail = Nothing
    Set objApp = Nothing


Quote:
> I have written a program in VB6 that calculates data on
> items sold over the Internet.  I have a textbox called
> txtBuyerEmail that contains the buyers Email Address.  What
> I want is working code or a viable explanation of how to
> load outlook express and place the users email from
> txtBuyerEmail in outlooks
> "TO:" text box.

> I'd also appreciate  anyone who can show me how to take
> data from an access data base or preferably from a data
> report and place it into outlooks message body or for an
> alternative to using outlook express altogether.

> Thanks in advance.

> Regards,
> Vijay Bhatter, MCSD
> http://www.{*filter*}ax.net/vijay



Sun, 31 Aug 2003 21:09:42 GMT  
 Calling Outlook express from VB
Another alternative:  use the ShellExecute() API function, passing it a
"mailto:" URL.  This won't necessary run Outlook Express, but rather the default
e-mail program on the computer (could be Outlook, Eudora, whatever).

-- Matthew Solnit


Quote:
> You can't automate Outlook Express as it doesn't support it.  You can
> automate Outlook though, or use the MAPI objects

>     Set objApp = CreateObject("Outlook.Application")
>     Set objMail = objApp.CreateItem(0)

>     objMail.Subject = Now
>     objMail.Body = "Testing"
>     objMail.Send
>     Set objMail = Nothing
>     Set objApp = Nothing



> > I have written a program in VB6 that calculates data on
> > items sold over the Internet.  I have a textbox called
> > txtBuyerEmail that contains the buyers Email Address.  What
> > I want is working code or a viable explanation of how to
> > load outlook express and place the users email from
> > txtBuyerEmail in outlooks
> > "TO:" text box.

> > I'd also appreciate  anyone who can show me how to take
> > data from an access data base or preferably from a data
> > report and place it into outlooks message body or for an
> > alternative to using outlook express altogether.

> > Thanks in advance.

> > Regards,
> > Vijay Bhatter, MCSD
> > http://www.{*filter*}ax.net/vijay



Sun, 31 Aug 2003 21:43:35 GMT  
 Calling Outlook express from VB
True, but it's harder to populate the mail message.  You can use


but that's only good for so much data.


Quote:
> Another alternative:  use the ShellExecute() API function, passing it a
> "mailto:" URL.  This won't necessary run Outlook Express, but rather the
default
> e-mail program on the computer (could be Outlook, Eudora, whatever).

> -- Matthew Solnit



Sun, 31 Aug 2003 22:07:08 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Calling outlook Express from VB, with address, subject and some text included

2. How to call Outlook express in VB source code

3. Calling Outlook express from VB

4. Creating mail accounts for Outlook/Outlook Express using VB

5. VB Using Outlook Express to Outlook

6. Calling Outlook Express from VBScript

7. Outlook express won't auto-download when called from MAPIMessages control

8. cannot connect outlook to email server, but can connect outlook express

9. Inserting icons onto Outlook and Outlook Express

10. Outlook - or outlook Express

11. Programming outlook/outlook express from code

 

 
Powered by phpBB® Forum Software