Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

E-mail genereren met variabelen uit Excel.

525 views
Skip to first unread message

Hans Bouwman

unread,
Jan 2, 2003, 3:48:52 PM1/2/03
to
Hallo,

kan mij iemand vertellen of ik Email kan genereren uit Excel.
Ik heb diverse rijen waar artikelen met naam en prijs in staan.
In dezelfde rij staat ook een E-mail adres.
Ik wil nu een mailtje met een standaardtekst versturen waarin in de tekst
een artikelomschrijving met aantal en prijs vermeld staat naar de koper.
Dit moet alleen vanuit de rij die ik op dat moment aanklik.

voorbeeld :

arttikelcode prijs produkt aantal naam E-mail.
123456 20 radio 1 Jan j...@piet.nl

moet dan een mailtje worden naar : j...@piet.nl

met de volgende tekst :
--------------------------------------------------------------------
Hallo Jan,
je kocht bij ons 1 radio, artikel 123456 voor de prijs van 20 Euro.
m.vr.gr.
Hans.
--------------------------------------------------------------------

Is dit mogelijk ?

Alvast bedankt,
Hans.


Ingrid Baplue

unread,
Jan 2, 2003, 4:00:10 PM1/2/03
to
Op deze pagina staan vele mogelijkheden om te mailen vanuit Excel:
http://www.rondebruin.nl/sendmail.htm

Ingrid

Hans Bouwman schreef in news:av28ii$15v$1...@news.hccnet.nl

Hans Bouwman

unread,
Jan 2, 2003, 4:39:48 PM1/2/03
to
Hallo Ingrid,
bedankt voor het snelle antwoord.
De pagina van Ron had ik gisteren al gevonden maar kom er helaas niet uit.

Hans.


"Ingrid Baplue" <ingrid_bap...@hotmail.com> wrote in message
news:OpX1QIqsCHA.1844@TK2MSFTNGP09...

Hans Bouwman

unread,
Jan 2, 2003, 5:36:34 PM1/2/03
to
Ik heb een button gemaakt en volgende code er achter gezet :

Sub CommandButton1_Click()
Dim Email As String, Subj As String
Dim Msg As String, URL As String
Dim r As Integer, x As Double
' Get the email address
Email = Cells(t, 1738)

' Message subject
Subj = "" & Cells(c, 1738) & "via Ebay " & Cells(b, 1738).Text & ""

' Compose the message
Msg = ""
Msg = Msg & "Hallo " & Cells(u, 1738) & "," & vbCrLf & vbCrLf
Msg = Msg & "Je bent de winnende bieder op de veiling van : "
Msg = Msg & Cells(c, 1738) & "." & vbCrLf & vbCrLf
Msg = Msg & "Op dit kavel bood je het bedrag van ? "
Msg = Msg & Cells(j, 1738).Text & "." & vbCrLf & vbCrLf
Msg = Msg & "Hans Bouwman" & vbCrLf
Msg = Msg & "President"

' Replace spaces with %20 (hex)
Subj = Application.WorksheetFunction.Substitute(Subj, " ", "%20")
Msg = Application.WorksheetFunction.Substitute(Msg, " ", "%20")

' Replace carriage returns with %0D%0A (hex)
Msg = Application.WorksheetFunction.Substitute(Msg, vbCrLf,
"%0D%0A")
' Create the URL
URL = "mailto:" & Email & "?subject=" & Subj & "&body=" & Msg

' Execute the URL (start the email client)
ShellExecute 0&, vbNullString, URL, vbNullString, vbNullString,
vbNormalFocus

' Wait two seconds before sending keystrokes
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"

End Sub

Hierna krijg ik telkens de foutmelding : Sub or Function not defined.
Ik kom er echt niet uit.

Hans.
"Ingrid Baplue" <ingrid_bap...@hotmail.com> wrote in message
news:OpX1QIqsCHA.1844@TK2MSFTNGP09...

Hans Bouwman

unread,
Jan 2, 2003, 6:45:11 PM1/2/03
to

"Hans Bouwman" <ha...@pcexpresse.com> wrote in message
news:av2es8$anu$1...@news.hccnet.nl...
0 new messages