Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Call the Windows Address Book
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00458008
Message ID:
00460846
Vues:
10
Take a look in MSDN at "Using the MAPI controls" which describes the MSMAPI32.OCX ActiveX interface to MAPI that shipped with VS6. This describes accessing the Address Book in a general way. Load the MSMAPI32.OCX in VB6's Object Browser to see the details about it. Just do this for the address book:

oSession = CREATEOBJECT("MSMapi.MapiSession")
osession.logonui = .t.
osession.signon
omessage = CREATEOBJECT("MSMapi.MapiMessages")
omessage.sessionid=osession.sessionid
oMessage.MsgIndex = -1 && Create New
oMessage.AddressEditFieldCount = 3 && Enable To, CC and BCC
oMessage.Compose
omessage.Action = 11 && mapShowAddressBook, according to VB6's browser
* And it appears!!!
for lnI = 1 to oMessage.RecipCount
oMessage.RecipIndex = lnI
?oMessage.RecipAddress
endfor

* Use AttachmentCount, AttachmentIndex & AttachmentPathName to attach
* the PDF to the message,
* Use MsgSubject & msgNoteText to create the message

oMessage.Send( 1 ) && 0/1= whether to show UI.

* Have Fun!

>I have a form where the user will be creating a PDF attachment for emailing based on a report I have designed. I would like to add a command button that will allow the user to call their Windows Address Book (Outlook Express specifically). This will enable them to select an address before launching outlook express.
>
>Is there a control or class for calling the WAB, or is it just a few lines in the click event of the button.
>
>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform