Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mass emailing
Message
De
10/12/2001 12:34:19
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
 
 
À
10/12/2001 11:56:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00589809
Message ID:
00592210
Vues:
48
>>>>>>Okay, I've pretty much figured out how to automate Outlook. The only part I'm getting stuck on is how to get HTML into the body of my message, without sending an attachment. Any ideas?
>>>>>
>>>>>Elyse --
>>>>>
>>>>>HTML is simply text formatted with tags. You can generate that in VFP in a variety of fashions -- simple string concatenation is a quick and dirty method.
>>>>>
>>>>>I posted a procedure which creates an HTML table from a VFP cursor in message #567894. That may give you some ideas for some simple uses -- like letters. HTML is really pretty straightforward for things like formatted email.
>>>>>
>>>>>
>>>>>
>>>>>Jay
>>>>
>>>>Let's say I have a Word document. How can I get that to be the body of my email message? Or what if I have an HTML document? If I copy and paste from my Word doc to my Outlook message manually it works, but how can I do that programmatically?
>>>
>>>Well, that's the $64 question isn't it?
>>>
>>>Automating Word is the first step.
>>>
>>>oMyWord = CREATEOBJECT ("Word.Application")
>>>
>>>Once you have Word available as a VFP object, you can manipulate it's many methods and procedures thru VFP. I suspect there's info in the library here to give you more detail. And, Tamar Granor's and Della Martin's Microsoft Office Automation with Visual FoxPro is a great resource.
>>>
>>>I'll go through the steps you'd need and provide suggestions for how to transform that into code. And, I hope that will give the tools you need.
>>>
>>>The steps you want to go through for the process would look something like this:
>>>
>>>1. Open a Word document in Word.
>>>2. Assuming you're using Word 2000 or above (actually, 97 may work OK), select, from the menu "File..Save As.." then save to HTML format.
>>>3. Through VFP, do a FileToStr (myWordDoc.HTM) and then you have it!
>>>
>>>For steps 1 and 2, you can do the following:
>>>
>>>Create a macro
>>>Do an operation
>>>Review the macro code -- which is in VBA.
>>>It's a fairly straightforward conversion to VFP, but if you run into problems, post again.
>>>
>>>HTH,
>>> Jay
>>
>>I created a simple document in Word with a logo and short message. I saved this file as a Web Page (html). In my code that builds the Outlook email, I set the text of my email = FileToStr(MyWordDoc.htm). But when I look at the email the program created, I see the HTML code, not my logo. Am I missing something?
>
>Do you see HTML only?
>
>Is your logo a graphic file or strictly HTML?
>
> Jay

I see HTML only. The logo was a BMP saved as HTML.
Elyse Pomerantz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform