Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Picture in e-mail html body
Message
 
À
26/08/2004 08:01:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00936552
Message ID:
00936992
Vues:
14
One of the solutions is:
* your code goes here ......

lcfile=fullpath(filename)

loMail.Display
oShell = CreateObject("WScript.Shell")
IF oShell.AppActivate(loOutlook.ActiveWindow.caption)
	oShell.SendKeys("^{END}")    && set cursor in the body area
	oShell.SendKeys("%IP")  && activate Insert Picture Dialog
	oShell.SendKeys(lcfile+"{ENTER}") && Insert picture from file
ENDIF

loMail.Send()
Check for proper key combination above.


>Hello, using the 'Outlook.Application'-object i'm trying to send an email with a HTML-body. In this HTML-body I'm using an image which must be visible in the body.
>My question: how can I add the image to the mail when sending the mail ? I tried to add the image as an attachment but when sending the mail the image is added as an attachment but in the body the link to the image is broken.
>
>
>loOutlook = CREATEOBJECT("Outlook.Application")
>loMail = loOutlook.CreateItem(0)		&& Email
>loMail.Subject = "Hello"
>loMail.Recipients.Add("tim@tml.be")
>loMail.Attachments.Add("c:\dbfactw\logo.jpg")
>loMail.HTMLBody = [<html><body bgcolor="#00CCFF"><img src=c:\dbfactw\logo.jpg" width="403" height="372"></body></html>]
>loMail.Send()
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform