Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook and VFP
Message
From
24/07/2009 10:11:12
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
01414069
Message ID:
01414178
Views:
47
That did it. Thanks Sergey.

>Try
>
>loWSH = CreateObject( "WScript.Shell" )
>loEmailitem.Display()
>loWSH.AppActivate( loEmailItem.Application.ActiveInspector.Caption )
>
>
>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é
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform