Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Html email
Message
 
 
À
15/01/2001 23:12:40
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00464060
Message ID:
00464209
Vues:
16
>From Vfp I would like to send html email, is it possible and how does one do it?
>I have tried CreateObject("Outlook.Application") but this will not convert the html.
>With CreateObject("CDONTS.NewMail"), I receive an error on the send (not registered). I installed CDO 1.2 from outlook 2000 and also manually registered cdo.dll.

Hello, Anthony.

You have to put your text in the HTMLBody property, not in Body.

Here is a little example. It's not checked at the command window, just cut and pasted from a couple of methods from a form.
loApplication = CreateObject( "Outlook.Application" )

llActive = ( varType( loApplication ) = "O" )

if llActive

   loMapiSpace = loApplication.GetNameSpace( "MAPI" )

   loInbox = loMapiSpace.GetDefaultFolder( 6 )

   loNew = loInbox.Items.Add()

   loNew.Recipients.Add( tcAddress )
   loNew.Subject = tcSubject
   loNew.HTMLBody = tcHTMLBody
   loNew.Send()
endif
Hope this helps,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform