Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Intersperce HTML and worddoc
Message
 
À
14/03/2005 13:37:34
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00995586
Message ID:
00995637
Vues:
12
This message has been marked as the solution to the initial question of the thread.
Here my test with Your sameple. It works.
#define wdFormatHTML 8

   *** Please Select a Word Doc
   m1 = GETFILE() && Get word file to Open
   oWord = CREATEOBJECT("Word.Application")
   oWord.Documents.Open(m1)
   oWord.ActiveDocument.SaveAs("c:\tte.htm", wdFormatHTML)
   m_text = FILETOSTR("c:\tte.htm")

TEXT TO lcHTML TEXTMERGE NOSHOW

    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>File Notes</title>
    </head>

    <body>

    <table border="1" width="100%" id="table1">
        <tr>
            <td width="100" align="center" bgcolor="#808000">
            <font face="Verdana" color="#FFFFFF">Claim Number</font></td>
            <td width="294" align="center" bgcolor="#808000">
            <font face="Verdana" color="#FFFFFF">Claimant's Name</font></td>
            <td align="center" bgcolor="#808000">
            <font face="Verdana" color="#FFFFFF">Date of Injury</font></td>
        </tr>
        <tr>
            <td width="100">94000049 </td>
            <td width="294">PEDEMONTI, THERESA </td>
            <td>09/27/88</td>
        </tr>
    </table>
                <table border="1" width="100%" id="table2">
                <tr>
                <td width="100" bgcolor="#0000FF"><font color="#FFFFFF" size="2" face="Verdana"><b>Line No</b></font></td>
                <td width="294" bgcolor="#0000FF"><font color="#FFFFFF" size="2" face="Verdana"><b>Date</b></font> </td>
                <td bgcolor="#0000FF"><font color="#FFFFFF"  size="2" face="Verdana"><b>Created By</b></font></td>
                </tr>
                <tr>
                    <td width="89"><font size="2">1</font></td>
                    <td width="109"><font size="2">03/25/02</font></td>
                    <td><font size="2">SALLEN    </font></td>
                </tr>
            </table>
            <table border="0" width="100%" id="table3">
                <tr><td>
                <font face="Courier New">
                <span style="background-color: white"><font size="2"><<m_text>></font></span>
                </font>
                </td>
                </tr>
            </table>
    </body>

    </html>
ENDTEXT

STRTOFILE(lcHTML , "c:\test.htm")

**** Open now c:\test.htm
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform