Ik heb het onderstaande script in excel gebruikt (van internet geplukt), nu wil ik graag bepaalde excel velden mee mailen. Is dit mogelijk?
Private Sub knop1_Click()
' Microsoft Outlook object variables.
Dim myolApp, olNameSpace, myFolder, myMailItem
' Try to create an MSOutlook object
Set myolApp = CreateObject("Outlook.Application")
' Set up MAPI name space for mailing
Set olNameSpace = myolApp.GetNameSpace("MAPI")
' Create a mail item
Set myMailItem = myolApp.CreateItem(0)
' Set up mail recipient.
myMailItem.To = "testuser@test.nl"
' Set message subject.
myMailItem.Subject = "test" + Answer_Phone
' Set the body of the message
myMailItem.Body = "test"
' Send mail to recipients
Private Sub knop1_Click()
' Microsoft Outlook object variables.
Dim myolApp, olNameSpace, myFolder, myMailItem
' Try to create an MSOutlook object
Set myolApp = CreateObject("Outlook.Application")
' Set up MAPI name space for mailing
Set olNameSpace = myolApp.GetNameSpace("MAPI")
' Create a mail item
Set myMailItem = myolApp.CreateItem(0)
' Set up mail recipient.
myMailItem.To = "testuser@test.nl"
' Set message subject.
myMailItem.Subject = "test" + Answer_Phone
' Set the body of the message
myMailItem.Body = "test"
' Send mail to recipients