M
Mark
Hi - apologies in advance if this is not the correct forum - tried
searching loads, and still to find a workable solution.
Generating a word document from ASP - no problem. Inserting page breaks
into the generated page, so that when loaded into Word it forces a page
break, I cannot manage:
No matter if I use:
<p STYLE="page-break-after: always"></p>
or
<%=chr(10)%><%=chr(13)%>
...when opened in Word it will not start content on a new page.
Any ideas? Thank you,
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Response.Buffer = TRUE
Response.ContentType = "application/msword"
response.AddHeader "content-disposition", "inline; filename=xxx.doc"
%>
<%
'code to get a recordset here
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="font:verdana">
<p> </p>
' first generate table of contents
<% for i = 0 to numrows %>
<%=rsSolArr(0,i)%>: <a href="#<%=rsSolArr(0,i)%>"><%=rsSolArr(1,i)%></a>
<br>
<% next %>
'now generate actual content
<% for i = 0 to numrows %>
<p STYLE="page-break-after: always"></p>
<a name="<%=rsSolArr(0,i)%>"></a><%=rsSolArr(0,i)%>:
<%=rsSolArr(1,i)%><br>
<%=rsSolArr(2,i)%><br><br><%=chr(10)%><%=chr(13)%>
</div>
<% next %>
</body>
</html>
searching loads, and still to find a workable solution.
Generating a word document from ASP - no problem. Inserting page breaks
into the generated page, so that when loaded into Word it forces a page
break, I cannot manage:
No matter if I use:
<p STYLE="page-break-after: always"></p>
or
<%=chr(10)%><%=chr(13)%>
...when opened in Word it will not start content on a new page.
Any ideas? Thank you,
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Response.Buffer = TRUE
Response.ContentType = "application/msword"
response.AddHeader "content-disposition", "inline; filename=xxx.doc"
%>
<%
'code to get a recordset here
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="font:verdana">
<p> </p>
' first generate table of contents
<% for i = 0 to numrows %>
<%=rsSolArr(0,i)%>: <a href="#<%=rsSolArr(0,i)%>"><%=rsSolArr(1,i)%></a>
<br>
<% next %>
'now generate actual content
<% for i = 0 to numrows %>
<p STYLE="page-break-after: always"></p>
<a name="<%=rsSolArr(0,i)%>"></a><%=rsSolArr(0,i)%>:
<%=rsSolArr(1,i)%><br>
<%=rsSolArr(2,i)%><br><br><%=chr(10)%><%=chr(13)%>
</div>
<% next %>
</body>
</html>