Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook and VFP
Message
From
23/07/2009 17:04:31
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Outlook and VFP
Miscellaneous
Thread ID:
01414069
Message ID:
01414069
Views:
158
I have the following code
#DEFINE olFolderInbox 6
#DEFINE olFolderOutbox 4
#DEFINE olMailItem 0
#DEFINE olRecipient 4
#DEFINE olRecipients 17
#DEFINE IMPORTANCENORMAL 1
loApp=CreateObject("Outlook.Application")
loNamespace = loApp.GetNamespace("MAPI")
loFolder = loNamespace.GetDefaultFolder(olFolderInbox)
loEMailItem = loFolder.Items.Add(olMailItem)
loEmailItem.Subject = "Test VFP - Outlook"
loEmailItem.Recipients.Add('emailadress@someplace.com') && uses the Recipients collection
loEmailItem.Importance = IMPORTANCENORMAL
loEmailItem.HTMLBody = "Body"
loemailitem.Display()
*loEmailItem.Send
*loApp.Quit()
release loApp, loEmailItem
Display doesn't really show Outlook. It justs highlight Outlook in my Vista Application toolbar. Outlook doesn't become the active app. I have to click on it in the toolbar to really see it. Any way to really make it the active app. and see the e-mail I just created?
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Next
Reply
Map
View

Click here to load this message in the networking platform