Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot attach html file to email message
Message
De
12/02/2007 09:34:29
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01193976
Message ID:
01194713
Vues:
31
>First I would start with investigating what could be the difference of what was recently when it "Never gave me any problems by now", and now with this new html file, with the way the user set html format, etc.

Will sure do
Thks :)
>
>
>>It happen if user hv mail format set to html already.
>>Did not try with another htm file. I am producing one and attaching it to email using folowing call.
>>
>>
>>oMessage = oOutlook.CreateItem(0)
>>...oMessage.Attachments.Add(cFileName_FullPath)
>>
>>Or should be
>>...oMessage.Attachments.Add(cFileName_FullPath, SomeParameterNeededHere ? )
>>
>>I am using class that I found somewhere long time ago.
>>Never gave me any problems by now.
>>
>>
>>
>>
>>
>>>Does it happen with any htm/html file?
>>>How do you do attaching exactly? Please, show your code.
>>>What if you set default email format back to text, but force message body to be reformatted, like:
>>>
>>>WITH oEmailItem
>>>.....
>>>	.htmlbody = "<HTML><H2>This is HTML Mail.</H2><BODY>Some body text.</BODY></HTML>"
>>>	=adir(aa,"*.htm")
>>>	for ia=1 to alen(aa,1)
>>>		.Attachments.Add(fullpath(aa[ia,1]))
>>>	endfor
>>>	.Save
>>>	.DISPLAY
>>>....
>>>
>>>
>>>>Nope!
>>>>File gets created, OLE call issued
>>>>...oMessage.Attachments.Add(cFileName)
>>>>but nothing gets attached. If I change default email format in outlook to rtf or plain text everyting works fine.
>>>>If I create xls file and try to attach to html message format it works !
>>>>
>>>>So only problematic combination is HTML attachment with
>>>>HTML default email format. Very funny !
>>>>
>>>>>
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform