Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook automation: send cc: and display dialog
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00299892
Message ID:
00299904
Vues:
17
Kevin,

From Outlook 2000 VBA help -- might work with earlier versions:

Use the Add method to create a new Recipient object and add it to the Recipients collection. The Type property of a new Recipient object is set to the default for the associated AppointmentItem, JournalItem, MailItem or TaskItem object and must be reset to indicate another recipient type.

The following example creates a new MailItem object and adds "Jon Grande" as the recipient using the default type ("To").

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myRecipient = myItem.Recipients.Add ("Jon Grande")
The following example creates the same MailItem object as the preceding example, and then changes the type of the Recipient object from the default ("To") to "CC."

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myRecipient = myItem.Recipients.Add ("Jon Grande")
myRecipient.Type = olCC

-------

NOTE: olCC for type = 2, olBCC (blind cc) = 3, olTo = 1
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform