Solved

An ActiveX control to submit a form to a mail account- points will be incresed if answered.

Posted on 1998-11-30
1
144 Views
Last Modified: 2013-12-26
I want to have a activex control which can be used to submit a form directly to a mail server without the mail compose dialog box.This is a MS-Exchange mail server.I am a VB -5 programmer and will appreciate if u can tell me how to start making such an ActiveX control and also if it is available on the net ,plese do direct me there.if ur telling me to do I would appreciate if u tell me some books to read also for MAPI programming.

I will incease the point to at least 100 and grade it if i get an appropriate answer.
0
Comment
Question by:zeus_akkali
1 Comment
 
LVL 13

Accepted Solution

by:
Mirkwood earned 10 total points
ID: 1488578
ere is an example of using OLE Messaging to send a message:

Dim oSession As Object
 
Set oSession = CreateObject("MAPI.Session")
oSession.Logon "MS Exchange Settings", True
Dim objMessage As Object ' Message object
Dim objOneRecip As Object ' Recipient object
 
If oSession Is Nothing Then
MsgBox "You have to log on first...."
Exit Sub
End If
 
Set objMessage = oSession.Outbox.Messages.Add
' create the recipient
Set objOneRecip = objMessage.Recipients.Add
objOneRecip.Name = "Rickcau@Microsoft.com"
objOneRecip.Type = mapiTo
objOneRecip.Resolve (True) 'Show dialog to resolve ambiguities
With objMessage ' message object
subject = "Test MAPI/OLE VB Message w/ole object - explicit"
Text = "Like you really wanted this ... please delete this test"
End With
' send the message
objMessage.Send showDialog:=False

For more information on direct MAPI calls and OLE Messaging, in the MSDN Library, see the book Win32 Messaging API (MAPI) in the Win32 SDK.

VB4: VBMAIL.ZIP MAPI sample to send/retrieve mail (VB4) at http://www.geocities.com/~scvb/allfiles.htm
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now