Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Outlook Automation
Message
From
01/08/2000 15:44:48
 
 
To
01/08/2000 13:10:03
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00398593
Message ID:
00399547
Views:
26
Hi John,

I forgot to say, thanks also to Tamar for pointing out my original problem.

>You might want to look into gettign a copy of Office 2000 Developer ... it includes the HTML help files for all versions of Office going back to 95.

I think the help file might be available online somewhere - I'll have a look for it. I also have the MSDN library, so I can search through that for some titbits.

In the meantime, could you possibly answer a question about the following:

I can create an email by automating Outlook. However, when I do that, the From field is always empty. I assumed it would be filled in automatically. How would I populate the From field, without hard-coding it ?

My code to create an email in the outbox is as follows:
#DEFINE olFolderOutBox 4

oOutLookObject = CreateObject("Outlook.Application")
oNameSpace=oOutlookObject.GetNameSpace("MAPI")
oOutBoxFolder=oNameSpace.GetDefaultFolder(olFolderOutBox)
oEmailItem=oOutBoxFolder.Items.Add
	   
With oEmailItem
   .To  = "me@myaddress.com"
   .Subject = "Test email message"
   .Body = "Hello World"
   .Send
EndWith

release oEmailItem, oOutBoxFolder, oNameSpace, oOutLookObject
Best.

Matt.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform