Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Outlook Automation
Message
De
01/08/2000 15:44:48
 
 
À
01/08/2000 13:10:03
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00398593
Message ID:
00399547
Vues:
24
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform