Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Outlook
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00394585
Message ID:
00394632
Views:
13
>I found out it needed one more line
>nsole = rep1ole.GetNameSpave("MAPI")
>
>Of course, none of the other calls are the same, and Technet has no good help on how to create and send a message dynamiclay from a database, which is what I need to do.
>This is of course a governemt project (See defintion of an elephant)
>
>
>Elephant: A mouse built to government specifications


Here's a little help to get you started.

oOutlook = createobject('outlook.application')
oNameSpace = oOutlook.GetNameSpace("MAPI")
oMailItem = oOutlook.CreateItem(0) && 0 = mail item

for i = 1 to alen(laSomeEmailAddresses)
oMailItem.Recipients.ADD(laSomeEmailAddresses[i])
endfor

oMailItem.Body = "Insert message body text here"
oMailItem.Subject = "Insert a subject line here"
oMailItem.Send


Of course I haven't test this code but it should work. MSDN library is actuall a great place for info. If you don't have it locally you can get it on the web at:

http://msdn.microsoft.com/library/default.asp?URL=/library/officedev/odecore/ODEstartpage.htm
Rip Ryness
International Falls, MN
Previous
Reply
Map
View

Click here to load this message in the networking platform