Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default How can I use Outlook express to send mail rather than Outlook by VBA code

How can I use Outlook express to send mail rather than Outlook by VBA code
thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How can I use Outlook express to send mail rather than Outlook by VBA code

Have you seen my reply and try it ?

--
Regards Ron de Bruin
http://www.rondebruin.nl


"new.microsoft.com" wrote in message ...
How can I use Outlook express to send mail rather than Outlook by VBA code
thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default How can I use Outlook express to send mail rather than Outlook by VBA code

Thank you very much Ron,
Yes, but i don't understand how the Outlook Express can be called rather
than Outlook as creat object only has the outlook and no outlook express.



"Ron de Bruin" wrote in message
...
Have you seen my reply and try it ?

--
Regards Ron de Bruin
http://www.rondebruin.nl


"new.microsoft.com" wrote in message
...
How can I use Outlook express to send mail rather than Outlook by VBA
code
thanks






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How can I use Outlook express to send mail rather than Outlook by VBA code

Hi

You must use SendMail code If you want to use OE and not the Outlook object model


--
Regards Ron de Bruin
http://www.rondebruin.nl


"new.microsoft.com" wrote in message ...
Thank you very much Ron,
Yes, but i don't understand how the Outlook Express can be called rather than Outlook as creat object only has the outlook and no
outlook express.



"Ron de Bruin" wrote in message ...
Have you seen my reply and try it ?

--
Regards Ron de Bruin
http://www.rondebruin.nl


"new.microsoft.com" wrote in message ...
How can I use Outlook express to send mail rather than Outlook by VBA code
thanks








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default How can I use Outlook express to send mail rather than Outlook by VBA code

I see. Ron do you know why my following code doesn't work? The mail just
displayed but not send out. Thanks

Sub SendWithAtt()

Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim CurrFile As String


Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)


ActiveWorkbook.Save

' CurrFile = ActiveWorkbook.path & "\" & ActiveWorkbook.Name
CurrFile = ActiveWorkbook.path & "\" & "OSAllowRates.pdf"
With olMail
.To = "
'.CC = ""
.Subject = "Testing"
.Body = "Hello"
.Attachments.Add CurrFile
.Display '
End With
Application.SendKeys "%S"

Set olMail = Nothing
Set olApp = Nothing

End Sub



"Ron de Bruin" wrote in message
...
Hi

You must use SendMail code If you want to use OE and not the Outlook
object model


--
Regards Ron de Bruin
http://www.rondebruin.nl


"new.microsoft.com" wrote in message
...
Thank you very much Ron,
Yes, but i don't understand how the Outlook Express can be called rather
than Outlook as creat object only has the outlook and no outlook express.



"Ron de Bruin" wrote in message
...
Have you seen my reply and try it ?

--
Regards Ron de Bruin
http://www.rondebruin.nl


"new.microsoft.com" wrote in message
...
How can I use Outlook express to send mail rather than Outlook by VBA
code
thanks












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How can I use Outlook express to send mail rather than Outlook by VBA code

Be sure thet the VBA editor is closed when you try it

You can try this

Before the sendkeys line
Application.Wait (Now + TimeValue("0:00:03"))

Remember thet sendkeys is not reliable
If you can use CDO then use that
http://www.rondebruin.nl/cdo.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"new.microsoft.com" wrote in message ...
I see. Ron do you know why my following code doesn't work? The mail just displayed but not send out. Thanks

Sub SendWithAtt()

Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim CurrFile As String


Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)


ActiveWorkbook.Save

' CurrFile = ActiveWorkbook.path & "\" & ActiveWorkbook.Name
CurrFile = ActiveWorkbook.path & "\" & "OSAllowRates.pdf"
With olMail
.To = "
'.CC = ""
.Subject = "Testing"
.Body = "Hello"
.Attachments.Add CurrFile
.Display '
End With
Application.SendKeys "%S"

Set olMail = Nothing
Set olApp = Nothing

End Sub



"Ron de Bruin" wrote in message ...
Hi

You must use SendMail code If you want to use OE and not the Outlook object model


--
Regards Ron de Bruin
http://www.rondebruin.nl


"new.microsoft.com" wrote in message ...
Thank you very much Ron,
Yes, but i don't understand how the Outlook Express can be called rather than Outlook as creat object only has the outlook and
no outlook express.



"Ron de Bruin" wrote in message ...
Have you seen my reply and try it ?

--
Regards Ron de Bruin
http://www.rondebruin.nl


"new.microsoft.com" wrote in message ...
How can I use Outlook express to send mail rather than Outlook by VBA code
thanks












Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fw: send two or more files with Excel and Outlook Express Infosistem Excel Discussion (Misc queries) 1 August 17th 06 05:27 PM
How can I use Outlook express to send mail rather than Outlook by VBA code new.microsoft.com Excel Programming 1 August 1st 05 12:45 PM
Cannot send out Excel workbook through Outlook Express Abel Chan Excel Programming 5 March 7th 05 03:34 AM
Send to Outlook 2000 not Outlook Express Jimbo Excel Discussion (Misc queries) 2 January 4th 05 08:19 PM
Display mail application either in Outlook, or Outlook express [email protected] Excel Programming 0 April 13th 04 09:50 PM


All times are GMT +1. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"