Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email profile query
Message
 
 
To
23/09/2011 04:44:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01524325
Message ID:
01524427
Views:
64
Because the fist one is correct way to do it

>
>All working fine now - thanks. Out of interest, could you tell me why the following code does work:
>
>
>loNameSpace=loApplication.GetNameSpace("MAPI")
>loOutBox=loNameSpace.GetDefaultFolder(4)
>oMessage=loOutBox.Items.Add
>oMessage.sentOnBehalfOfName = "admin@mycompany.com"
>
>
>BUT
>This code:
>
>oMessage=CREATEOBJECT("MSMAPI.MAPIMessages.1")
>oMessage.sentOnBehalfOfName = "admin@mycompany.com"
>
>
>... fails with OLE error code 0x80020006: Unknown name."
>
>Not really that important as I have got it working, but I would just like to try to learn as I go!
>
>Thank you again for your help
>Barry
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform