Hi there,
I am using a form that pops up after the user clicks on the email. I want to record the recipients name to a table and count +1 for every email he/she sends to this recipient.
My form is working with a yes or no, that's no problem.
But how do I make the connection string in VB for outlook and how can I record the recipient properly?
This is what I have so far:
thank you very much for all your help,
greetz,
d2c
I am using a form that pops up after the user clicks on the email. I want to record the recipients name to a table and count +1 for every email he/she sends to this recipient.
My form is working with a yes or no, that's no problem.
But how do I make the connection string in VB for outlook and how can I record the recipient properly?
This is what I have so far:
Code:
Sub countmacro()
Dim conn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
Dim sConnString As String
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\BVRdb.mdb;User Id=admin;Password=;"
conn.Open sConnString
Set cmd.ActiveConnection = conn
cmd.CommandText = "SELECT * FROM overzicht"
cmd.CommandType = adCmdText
Set rs = cmd.Execute
Do While Not rs.EOF
rs.MoveNext
Loop
Set rs = Nothing
Set cmd = Nothing
conn.Close
Set conn = Nothing
End Sub
thank you very much for all your help,
greetz,
d2c