+ Reply to Thread
Results 1 to 6 of 6

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

  1. #1
    new.microsoft.com
    Guest

    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. #2
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message news:%[email protected]...
    > How can I use Outlook express to send mail rather than Outlook by VBA code
    > thanks
    >
    >




  3. #3
    new.microsoft.com
    Guest

    Re: 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" <[email protected]> wrote in message
    news:%[email protected]...
    > Have you seen my reply and try it ?
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "new.microsoft.com" <[email protected]> wrote in message
    > news:%[email protected]...
    >> How can I use Outlook express to send mail rather than Outlook by VBA
    >> code
    >> thanks
    >>
    >>

    >
    >




  4. #4
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message news:Omls%[email protected]...
    > 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" <[email protected]> wrote in message news:%[email protected]...
    >> Have you seen my reply and try it ?
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "new.microsoft.com" <[email protected]> wrote in message news:%[email protected]...
    >>> How can I use Outlook express to send mail rather than Outlook by VBA code
    >>> thanks
    >>>
    >>>

    >>
    >>

    >
    >




  5. #5
    new.microsoft.com
    Guest

    Re: 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 = "[email protected]"
    '.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" <[email protected]> wrote in message
    news:uQ$siH%[email protected]...
    > 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" <[email protected]> wrote in message
    > news:Omls%[email protected]...
    >> 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" <[email protected]> wrote in message
    >> news:%[email protected]...
    >>> Have you seen my reply and try it ?
    >>>
    >>> --
    >>> Regards Ron de Bruin
    >>> http://www.rondebruin.nl
    >>>
    >>>
    >>> "new.microsoft.com" <[email protected]> wrote in message
    >>> news:%[email protected]...
    >>>> How can I use Outlook express to send mail rather than Outlook by VBA
    >>>> code
    >>>> thanks
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




  6. #6
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message news:[email protected]...
    >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 = "[email protected]"
    > '.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" <[email protected]> wrote in message news:uQ$siH%[email protected]...
    >> 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" <[email protected]> wrote in message news:Omls%[email protected]...
    >>> 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" <[email protected]> wrote in message news:%[email protected]...
    >>>> Have you seen my reply and try it ?
    >>>>
    >>>> --
    >>>> Regards Ron de Bruin
    >>>> http://www.rondebruin.nl
    >>>>
    >>>>
    >>>> "new.microsoft.com" <[email protected]> wrote in message news:%[email protected]...
    >>>>> How can I use Outlook express to send mail rather than Outlook by VBA code
    >>>>> thanks
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1