Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook XP security dialogs
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
00964917
Message ID:
00975384
Vues:
26
>Now, for my other question.. Is there a way to use the default/specific stationery in outlook when calling a send mail in FoxPro?

Good question! But I can only think of a couple of ways of doing this (Which might not work for you). BTW Setting the Outlook Mail Format option in the Tools->Options->Mail format does not work with automation since if fact you are not using Outlook per se in automation but rather the COM portion of Outlook, which seems to bypass this setting.

One way would to create your entire message in a separate HTML format (using Word or whatever your favorite HTML editor is) and send that in the HTMLBody property of your message like this:
lcStr=FILETOSTR("c:\mymessage.htm")
objMsg.HTMLBody = lcStr
Or to get back to CDO for a moment. CDO permits the creation of MHT document (Web archive documents that include pictures, backgound etc... like a self-contained webpage).
Local lcFileName,lcStr
cFileName = 'c:\'+Sys(2015)+'.mht'
oMSG = Createobject("CDO.Message")
oMSG.CreateMHTMLBody("http://www.microsoft.com")
lcStr = oMSG.getstream
lcStr.SaveToFile(lcFileName,1)
lcMessage=FILETOSTR(lcFilename)
objMsg.HTMLBody = lcMessage
Another option (if CDO is not an option for you and you want to use MHT document) Word can save documents in MHT format as well. So it would mean to automate word to create your document, save it as MHT and load into a FILETOSTR() and put into your HTMLbody of your message.

Another option (the last one I promise) is Internet explorer as well saves in MHT format. So Automate internate explorer, load up your HTML documents (pictures and all), save the document as MHT and and load into a FILETOSTR() and put into your HTMLbody of your message.

Here is the automation portion of internet explorer that saves in an MHT document.
Local lcFile
lcFile = 'c:\'+Substr(Sys(2015),2,8)+'.mht'
oIE = Createobject('internetexplorer.application')
oIE.navigate('c:\mymessage.htm')
Inkey(6)
oIE.Visible =.T.
sp=Createobject("Wscript.Shell")
sp.SendKeys('%F')
sp.SendKeys('a')
sp.SendKeys('&lcFile')
Inkey(1)
sp.SendKeys("{TAB}")
sp.SendKeys('W')
sp.SendKeys("{TAB}")
sp.SendKeys('S')
oIE.Quit
Hope this gives options to start with.




>Thanks for clearing that out. I actually revert my program to use the class for outlook(MsOutlook 10.0 Object Library) since we need the features found in outlook for clients need.
>
>Security can now be by-passed by 3rd party software called Click-Yes.
>
>Now, for my other question.. Is there a way to use the default/specific stationery in outlook when calling a send mail in FoxPro?
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform