Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make newly created email the active window?
Message
From
07/02/2003 13:26:38
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00750723
Message ID:
00750724
Views:
24
Doug,

Use display() method.

>Does anybody know how to make an email message created in Outlook (via OLE automation from VFP) the active window? I have some code like this ...
>
> loOutlook = createobject( 'Outlook.Application' )
> loNameSpace = loOutlook.GetNameSpace('MAPI')
> loEmail = loOutlook.CreateItem(0)
> with loEmail
> .Subject = '///whatever'
> .Body = '///whatever'
> .Attachments.Add( '///whatever' )
> .Display()
> endwith
>
>... and I would like to make the newly created email message become visible as the active window, so that the user can type a few comments into it and then hit Send when they're done. As it is (above), I have to teach users to switch to Outlook and look in the Drafts folder for the new message, which is inconvenient and error-prone.
>
>TIA, Doug
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform