+ Reply to Thread
Results 1 to 4 of 4

Outlook Express - how to send value of a cell...

  1. #1
    Registered User
    Join Date
    03-11-2005
    Posts
    87

    Outlook Express - how to send value of a cell...

    Hi all,

    trying to set up a code so to send the value of a cell in an email message as an event gets triggered - just the value of a single cell to paste it on the message not the full worksheet.

    Found this

    Sub Mail_Outlook_Express()
    Dim Recipient As String, Subj As String, HLink As String
    Dim Recipientcc As String, Recipientbcc As String
    Dim msg As String
    Recipient = "[email protected]"
    Recipientcc = ""
    Recipientbcc = ""
    Subj = "trade"
    msg = "Hi there" & vbNewLine & vbNewLine & _
    "hello"
    msg = WorksheetFunction.Substitute(msg, vbNewLine, "%0D%0A")
    HLink = "mailto:" & Recipient & "?" & "cc=" & Recipientcc _
    & "&" & "bcc=" & Recipientbcc & "&"
    HLink = HLink & "subject=" & Subj & "&"
    HLink = HLink & "body=" & msg
    ActiveWorkbook.FollowHyperlink (HLink)
    Application.Wait (Now + TimeValue("0:00:02"))
    Application.SendKeys "%s"
    End Sub


    How to put the value of a certain cell into the msg=... line?


    Many thanks

    BC

  2. #2
    Ron de Bruin
    Guest

    Re: Outlook Express - how to send value of a cell...

    Hi bondcrash

    See
    http://www.rondebruin.nl/mail/oebody.htm


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



    "bondcrash" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hi all,
    >
    > trying to set up a code so to send the value of a cell in an email
    > message as an event gets triggered - just the value of a single cell to
    > paste it on the message not the full worksheet.
    >
    > Found this
    >
    > Sub Mail_Outlook_Express()
    > Dim Recipient As String, Subj As String, HLink As String
    > Dim Recipientcc As String, Recipientbcc As String
    > Dim msg As String
    > Recipient = "[email protected]"
    > Recipientcc = ""
    > Recipientbcc = ""
    > Subj = "trade"
    > msg = "Hi there" & vbNewLine & vbNewLine & _
    > "hello" msg = WorksheetFunction.Substitute(msg, vbNewLine,
    > "%0D%0A")
    > HLink = "mailto:" & Recipient & "?" & "cc=" & Recipientcc _
    > & "&" & "bcc=" & Recipientbcc & "&"
    > HLink = HLink & "subject=" & Subj & "&"
    > HLink = HLink & "body=" & msg
    > ActiveWorkbook.FollowHyperlink (HLink)
    > Application.Wait (Now + TimeValue("0:00:02"))
    > Application.SendKeys "%s"
    > End Sub
    >
    >
    > How to put the value of a certain cell into the msg=... line?
    >
    >
    > Many thanks
    >
    > BC
    >
    >
    > --
    > bondcrash
    > ------------------------------------------------------------------------
    > bondcrash's Profile: http://www.excelforum.com/member.php...o&userid=20997
    > View this thread: http://www.excelforum.com/showthread...hreadid=556031
    >




  3. #3
    Registered User
    Join Date
    03-11-2005
    Posts
    87
    cheers Ron... actually just found right that one!

  4. #4
    Ron de Bruin
    Guest

    Re: Outlook Express - how to send value of a cell...

    Look also at CDO if you not have Outlook to send mail
    http://www.rondebruin.nl/cdo.htm


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



    "bondcrash" <[email protected]> wrote in message
    news:[email protected]...
    >
    > cheers Ron... actually just found right that one!
    >
    >
    > --
    > bondcrash
    > ------------------------------------------------------------------------
    > bondcrash's Profile: http://www.excelforum.com/member.php...o&userid=20997
    > View this thread: http://www.excelforum.com/showthread...hreadid=556031
    >




+ 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