View Single Post
  #2  
Old August 6th 06, 01:35 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Send Emails with Outlook by Api

You will need to use #import in VC++ to import the Outlook type library and
generate the C++ header file.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"peterfarge" wrote in message
oups.com...
Hello NG,

I want to send Emails with MS Outlook by a plain C dll function. Has
someone an example how to control Outlook by API?

Or I must translate this VBA Macro I have found in the internet:
Private Sub SendMailExample()
Dim olApp As Outlook.Application
Dim oItem As Outlook.MailItem

Set olApp = New Outlook.Application
Set oItem = olApp.CreateItem(Outlook.OlItemType.olMailItem)
With oItem
.To = "
.Subject = "Revolution"
.Body = "Steve Ballmer takes control on Microsoft!"
.Attachments.Add "d:\abc.txt"
.ReadReceiptRequested = False
.Send
End With
End Sub
How can I translate this code to plain c? I need the datastructures. In
which dlls are this functions?



Regards

Peter



Ads