Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Send Emails with Outlook by Api (http://www.outlookbanter.com/outlook-vba/22448-send-emails-outlook-api.html)

peterfarge August 1st 06 10:36 AM

Send Emails with Outlook by Api
 
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


Dmitry Streblechenko August 6th 06 01:35 AM

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




peterfarge August 7th 06 09:41 AM

Send Emails with Outlook by Api
 
Thanks. :-)



Dmitry Streblechenko schrieb:

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




All times are GMT +1. The time now is 12:11 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com