Re: how do u send an email using access?



Like I said, it is designed for Outlook-assumed clients, but otherweise
you might need to check the registry. Information can be found here:

http://www.insideoutlookexpress.com/files/regkeys.htm

Also, you might need to make sure that it was also setup and the
default mail client.

I ran across this code that purports to work with everything, but does
not do attachments:

'**Module (space formatting added to make it easier to read):

Public Declare Function ShellExecute Lib "shell32.dll"
Alias "ShellExecuteA"
(ByVal hwnd As Long,
ByVal lpOperation As String,
ByVal lpFile As String,
ByVal lpParameters As String,
ByVal lpDirectory As String,
ByVal nShowCmd As Long)
As Long

'**Code attached to a button:

Dim stext As String

'Hard coded parts of the e-mail, stripped down to the minimum
stext = "mailto:me@xxxxxxxxxxxxxxx?";
stext = stext & "&Subject=" & "Document attached"
stext = stext & "&Body=" & "Please find the document attached"

'Launch default e-mail
Call ShellExecute(hwnd, "open", stext, vbNullString, vbNullString,
SW_SHOWNORMAL)

.



Relevant Pages

  • Re: E-Mail
    ... Public Declare Function ShellExecute Lib "shell32.dll" ... ByVal lpOperation As String, ... Dim stext As String ... Call ShellExecute(hwnd, "open", stext, vbNullString, vbNullString, ...
    (microsoft.public.access.forms)
  • Re: HELP!!! using full hyperlink filepath within VBA/API
    ... that basically takes the hyperlink and converts it to the full ... "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ... Dim PrintURL As String ... Call ShellExecute(0&, "print", URL, vbNullString, vbNullString, ...
    (microsoft.public.excel.programming)
  • Re: Date Validate Textbox - Opinions
    ... Perhaps I should go the MM and DD listbox route. ... If txtStartDate.Text vbNullString Then ... It's purpose is to pass a pointer to a null string in API ... you could check the locale ...
    (microsoft.public.vb.general.discussion)
  • Re: Ignore Null Values in function
    ... >values and only use the populated fields to filter and sort? ... Public Function kBuildFilterBetween(strField As String, ... Dim strBis As String ... strVon = Trim$(Nz(vVon, vbNullString)) ...
    (microsoft.public.access.modulesdaovba)
  • Re: Outdated help (feat. Access 97 and VB4)
    ... assigning a variable to vbNullString over "". ... Since a string Var not ... Dim q As String ... > unitialized string 1392 ...
    (comp.databases.ms-access)