Re: sending email with vb
have U installed option pack 4?
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
</center>
Re: sending email with vb
Hi,
Creating objects requires that the object'sclass be registered in the systemregistry and that any associateddynamic-link libraries (DLL) be available. This error has the following causes and solutions:
The class isn't registered. For example, the system registry has no mention of the class, or the class is mentioned, but specifies either a file of the wrong type or a file that can't be found.
If possible, try to start the object's application. If the registry information is out of date or wrong, the application should check the registry and correct the information. If starting the application doesn't fix the problem, rerun the application's setup program.
A DLL required by the object can't be used, either because it can't be found, or it was found but was corrupted.
Make sure all associated DLLs are available. For example, the Data Access Object (DAO) requires supporting DLLs that vary among platforms. You may have to rerun the setup program for such an object if that is what is causing this error.
The object is available on the machine, but it is a licensedAutomation object, and can't verify the availability of the license necessary to instantiate it.
Re: sending email with vb
This sample uses MAPI. Make sure you have Outlook installed. I also posted a "SMTP/POP3" sample for your other question: "Email without MAPI" if this is not what you needed.
'Create MAPI Session
set objsession = CreateObject("MAPI.session")
'Login using the default username
objSession.Logon "", "", false, false, 0
'Create message object
set objNewMessage = objsession.Outbox.Messages.Add
'Create recipient object
set objRecipient = objNewMessage.Recipients.Add
'Create attachment object
set objAttachment = objNewMessage.Attachments.Add
objRecipient.Name = [email protected]
objNewMessage.Subject = "Test Subject"
objNewMessage.Text = "Test Message"
objAttachment.Source = FileName & FileExtension
objAttachment.Name = FileName & FileExtension
objAttachment = Path & Filenumber & FileExtension
objRecipient.Resolve
objNewMessage.Update
objNewMessage.Send
objSession.Logoff
[email protected]
Re: sending email with vb
use the following code in the module
Option Explicit
Public Const EMAIL = "[email protected]"
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
Public Const SW_SHOWNORMAL = 1
Public Sub sendemail()
Dim Success As Long
Success = ShellExecute(0&, vbNullString, "mailto:" & EMAIL, vbNullString, "C:\", SW_SHOWNORMAL)
End Sub
and use this code in the application form
onclick event --->
sendmail