Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/12/2011, 13:31
Luiscifer
 
Fecha de Ingreso: octubre-2010
Ubicación: La Paz Bolivia
Mensajes: 18
Antigüedad: 13 años, 6 meses
Puntos: 1
Pregunta Exportar a Word de ASP con cabecera y pie de página

Hola a todos:

Tengo un problema quiero exportar a Word desde ASP con cabecera y pie de pagina, el codigo utilizado es el siguiente:

<%@ Language=VBScript CODEPAGE="65001"%>
<%Response.Expires = 0%>
<%Response.Buffer = true%>
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
@page Section1 {mso-footer:f1; mso-header:f2;}
div.Section1{page:Section1;}
}
</style>
</head>

<body>
<div class="Section1">
<div style="mso-element:header;" id="f2">TEXTO CABECERA</div>

<%
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader "Content-Disposition", "attachment; filename=documento.doc"

'CODIGO ASP QUE GENERA UNA TABLA LARGA QUE NO DESCRIBO PORQUE NO VALE LA PENA

%>

<div style="mso-element:footer" id="f1">TEXTO PIE DE PAGINA</div>

</div>
</body>
</html>


Y cuando ejecuto me genera un documento WORD con la cabecera y el pie de página correctamente pero también me muestra el texto "TEXTO CABECERA" al inicio y "TEXTO PIE DE PAGINA" al final del documento y no se que hacer si alguien tiene una respuesta lo apreciaria mucho

Saludos

Luiscifer