R
Rli
Hi all,
I have found out that one can open the users mailbox and prepare a mail to
send with code like this:
Dim sendstring As String
If Nz(Me.[envoyera], "") <> "" Then
sendstring = "mailto:" & Me.[envoyera].Value
If Nz(Me!envoyerCC, "") <> "" Then
sendstring = sendstring & "?CC=" & Me!envoyerCC.Value
End If
If Nz(Me!envoyerBCC, "") <> "" Then
sendstring = sendstring & "&BCC=" & Me!envoyerBCC.Value
End If
If Nz(Me!Sujet, "") <> "" Then
sendstring = sendstring & "&Subject=" & Me!Sujet.Value
End If
If Nz(Me!bodytexte, "") <> "" Then
sendstring = sendstring & "&Body=" & Me!bodytexte.Value
End If
Application.FollowHyperlink sendstring
End If
This works just fine, but does anyone know how to attach a file with this
method when the filename to attach is known?
(i tried also the sendobject method, but prefer not to because it implies a
reference to the outlook library, not always present for all users)
I have found out that one can open the users mailbox and prepare a mail to
send with code like this:
Dim sendstring As String
If Nz(Me.[envoyera], "") <> "" Then
sendstring = "mailto:" & Me.[envoyera].Value
If Nz(Me!envoyerCC, "") <> "" Then
sendstring = sendstring & "?CC=" & Me!envoyerCC.Value
End If
If Nz(Me!envoyerBCC, "") <> "" Then
sendstring = sendstring & "&BCC=" & Me!envoyerBCC.Value
End If
If Nz(Me!Sujet, "") <> "" Then
sendstring = sendstring & "&Subject=" & Me!Sujet.Value
End If
If Nz(Me!bodytexte, "") <> "" Then
sendstring = sendstring & "&Body=" & Me!bodytexte.Value
End If
Application.FollowHyperlink sendstring
End If
This works just fine, but does anyone know how to attach a file with this
method when the filename to attach is known?
(i tried also the sendobject method, but prefer not to because it implies a
reference to the outlook library, not always present for all users)