Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/11/2007, 14:03
Avatar de karmish
karmish
 
Fecha de Ingreso: mayo-2006
Mensajes: 272
Antigüedad: 18 años, 10 meses
Puntos: 1
Re: Como crear o generear un archivo WORD desde una pagina en asp

Segunda parte
Código:
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->
</script>
<style type="text/css">
<!--
#Layer1 {
	position:absolute;
	left:619px;
	top:65px;
	width:60px;
	height:60px;
	z-index:1;
}
-->
</style>
</head>
<body leftmargin="0">
<table width="776" border="0" cellpadding="0" cellspacing="0" background="images/reporte/fondo.gif">
  <!--DWLayoutTable-->
  <tr>
    <td width="776" height="19" valign="top" ><!--DWLayoutEmptyCell-->&nbsp;</td>
  </tr>
  <tr>
    <td height="2229" valign="top" ><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="770" height="932" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td height="174" colspan="3" align="center" valign="middle" class="reportetit">Resumen Ejecutivo del Postulante</td>
                <td width="325" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                <td width="4"></td>
              </tr>
          <tr>
            <td height="27" colspan="4" align="center" valign="middle"><img src="images/reporte/linea.jpg" width="750" height="3" /></td>
                <td></td>
              </tr>
          <tr>
            <td height="125" colspan="2" align="center" valign="middle"><img src="fotos/<%valor=rsfo.Fields("foto").value
if valor = "" then
valor = "no_foto.gif"
end if
Response.Write(valor)
%>" width="85" height="102" hspace="2" vspace="3" border="1" /></td>
                <td colspan="2" rowspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                <td></td>
              </tr>
          <tr>
            <td height="22" colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                <td></td>
              </tr>
          <tr>
            <td width="42" rowspan="3" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                <td height="126" colspan="3" valign="top"><span class="reportetit2"><%=oRs.Fields("nombre1").value%>&nbsp;<%=oRs.Fields("apellidopa").value%>&nbsp;<%=oRs.Fields("apellidoma").value%>.<br />
                  <%nacimiento=Year(oRS.Fields("fechana").value)
			fecha = Year(Now())
			mes = Month(Now())
			mes2 = Month(oRS.Fields("fechana").value)
			Resultado = fecha - nacimiento
			if mes2 > mes then 
			Resultado = Resultado -1
			 end if
			Response.Write(Resultado)
			%>
                  años<br />
                  <%=oRS.Fields("estadociv").value%>,&nbsp;&nbsp;<%=oRS.Fields("hijos").value%>&nbsp;hijos</span><br />
                <span class="reportetext"><%rut=oRS.Fields("rut").value
			 rut1=left(rut, 2)
			 rut2=left(rut,5)
			 rut2=right(rut2,3)
			 rut3=right(rut,5)
			 Response.Write(rut1&"."&rut2&"."&rut3)
			  %></span><br /><br /></td>
                <td></td>
              </tr>
          <tr>
            <td height="22" colspan="3" valign="top" class="reportetit2">EDUCACION</td>
                <td></td>
              </tr>
          <tr>
            <td height="435" colspan="3" valign="top"><%WHILE NOT rspos.EOF%>
              <span class="reportetit2">
                <%=rspos("tipo_postitu")%></span><br />
              <span class="reportetext">
                <%=rspos("des_postitu")%></span>
              <%rspos.MoveNext 
		  WEND %> 
              <br />
              <%WHILE NOT rspro.EOF%>
              <span class="reportetit2">
                <%uni=rspro.Fields("id_universidad").value
					SQLuniver="execute sp_s_instituto3 '"&uni&"';"
SET rsuni=DbObj.Execute(SQLuniver)
univer=rsuni.Fields("des_universidad").value
Response.Write(univer)%>
                </span>
              <br />
              <span class="reportetext">  <%car=rspro.Fields("id_carrera").value
					SQLcarrera="execute sp_s_profesion4 '"&car&"';"
SET rscar=DbObj.Execute(SQLcarrera)
carrera=rscar.Fields("des_carrera").value
Response.Write(carrera)%>,<%=rspro.Fields("ano_ini").value%>&nbsp;&nbsp;-&nbsp;&nbsp;<%=rspro.Fields("ano_fin").value%><br /> 
                </span>
              <%rspro.MoveNext 
		  WEND %>			</td>
                <td></td>
              </tr>
          <tr>
            <td height="1"></td>
                <td width="141"></td>
                <td width="258"></td>
                <td></td>
                <td></td>
              </tr>
          </table></td>
          <td width="6"></td>
        </tr>
      <tr>
        <td height="345" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td height="128" colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                <td width="315" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                <td width="3"></td>
              </tr>
          <tr>
            <td width="44" rowspan="3" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                <td height="17" colspan="2" valign="top"><span class="reportetit2">EXPERIENCIA PROFESIONAL</span></td>
                <td></td>
              </tr>
          <tr>
            <td height="24" colspan="2" align="left" valign="middle"><img src="images/reporte/linea2.jpg" width="700" height="5" /></td>
                <td></td>
              </tr>
          <tr>
            <td height="106" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <%WHILE NOT rsex.EOF%>
              <tr>
                <td width="387" height="24" valign="top"><span class="reportetit2"><%=rsex.Fields("empresa").value%></span></td>
                      <td colspan="2" valign="top"><span class="reportetit2">Desde <%=rsex.Fields("mes_ini").value%>&nbsp;<%=rsex.Fields("ano_ini").value%>&nbsp;a&nbsp;<%=rsex.Fields("mes_fin").value%>&nbsp;<%=rsex.Fields("ano_fin").value%></span></td>
                    </tr>
              <tr>
                <td height="81" colspan="2" valign="top">
                  <div align="justify"><span class="reportetit2">
                    <%depto1=rsex.Fields("id_famcargos").value
					  if depto1 <> "" then
					 	SQL8="execute sp_s_famcargos3 '"&depto1&"';"
						SET rss2=DbObj.Execute(SQL8)
					 depto1 = rss2("des_famcargo")
					 else
					 depto1 = "Departamento"
					 end if
					 Response.Write(depto1)
					  %>
                    &nbsp;&nbsp;-&nbsp;&nbsp;
                    <%cargo1=rsex.Fields("id_cargos").value
					  if cargo1 <> "" then
					MI1="execute sp_s_cargos4 '"&cargo1&"';"
					 SET bo1=DbObj.Execute(MI1)
					carg1 = bo1("des_cargos")
					 else
					 carg1 = "Cargo"
					end if
					 Response.Write(carg1)
					  %>
                    </span><br />
                    <span class="reportetext">
                      <%=rsex.Fields("des_expla").value%></span> <br />
                    <br />
                    <%rsex.MoveNext%>
                    <br />
                    <br />                
                    </div></td>
                      <td width="136" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
                    </tr>
              <tr>
                <td height="0"></td>
                      <td width="200"></td>
                      <td></td>
                    </tr>
              <%WEND%>
              </table></td>
                <td></td>
              </tr>
          <tr>
            <td height="69"></td>
                <td></td>
                <td></td>
                <td></td>
              </tr>
          <tr>
            <td height="1"></td>
                <td width="408"></td>
                <td></td>
                <td></td>
              </tr>
          
          </table></td>