Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook object
Message
 
 
À
30/01/2001 13:09:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00470073
Message ID:
00470211
Vues:
39
>Hi Jake,
>
>
>Can you show me how to put the html message in the HTMLBody property of the message object if I have a html file called test.html
>
>I have the following code:
>
oOutlook = createobject("outlook.application")

#DEFINE olFolderInBox 6
olookSpace = oOutlook.GetNamespace("MAPI")

if type("oOutLook") # 'O'
   messagebox("cannot open microsoft outlook",0,"Machines")
else
   oOutLookMail = oOutLook.CreateItem(0)
   ldMail = ""

   select 0 
   use (lcmail_address) alias Mail_address

   go top

   scan
      lcMail = alltrim(Mail_address.email) + ";"
      ldMail = ldMail + lcMail
   endscan

   * Add html code here
   lcHTMLBody = "Add HTML messagee here"

   with oOutLookMail
      .cc = ldMail 
      .subject = "test"
      .HTMLBody = lcHTMLBody    && Set the htmlBody here
      .send
   endwith
endif
I would've given you a more detailed HTML example but UT automatically interprets html tags. BTW When you use the HTMLBody property it automatically changes the Body property so do not use the body and HTMLBody properties in the same message.

Jake
Wine is sunlight, held together by water - Galileo Galilei
Un jour sans vin est comme un jour sans soleil - Louis Pasteur
Water separates the people of the world; wine unites them - anonymous
Wine is the most civilized thing in the world - Ernest Hemingway
Wine makes daily living easier, less hurried, with fewer tensions and more tolerance - Benjamin Franklin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform