/
Forside
/
Teknologi
/
Udvikling
/
ASP
/
Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn
*
Kodeord
*
Husk mig
Brugerservice
Kom godt i gang
Bliv medlem
Seneste indlæg
Find en bruger
Stil et spørgsmål
Skriv et tip
Fortæl en ven
Pointsystemet
Kontakt Kandu.dk
Emnevisning
Kategorier
Alfabetisk
Karriere
Interesser
Teknologi
Reklame
Top 10 brugere
ASP
#
Navn
Point
1
smorch
9259
2
Harlekin
1866
3
molokyle
1040
4
Steffanst..
758
5
gandalf
657
6
smilly
564
7
gibson
560
8
cumano
530
9
MouseKeep..
480
10
Random
410
Creating Header/Footer w/ ASP->Word? [MIME~
Fra :
xero
Dato :
31-12-02 01:23
I know how to get ASP to send a Word file to the client (via changing
the MIME type).
Change ContentType, print out basic HTML page, Word autoformats. Yay.
Here's the trick, I'd like to be able to add a page header across all
pages to this dynamic Word document.
Any idea how?
xero (Jason McDonald)
xero@xerotopia.net
My Thoughts:
I thought maybe I could add some VBScript or something and Word would
treat it as a Macro, but my experiments didn't turn out so well.
e.g.:
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.TypeText Text:="My Header"
Is there anyway to add an autoexecuting macro or just simply add the
headers via a DIV or something?
Sample Code for creating Word doc from ASP/HTML:
<%@ Language=VBScript %>
<%
Response.ContentType ="Application/vnd.ms-word"
Response.AddHeader "Content-Disposition","inline;filename=myWord.doc"
Dim i
%>
<TABLE name="tbl" id="tbl">
<TR>
<TH>Col 1</TH>
<TH>Col 2</TH>
<TH>Total</TH>
</TR>
<% For i = 0 To 50 %>
<TR>
<TD>1</TD>
<TD>2</TD>
<TD><FONT color="#000080">3</FONT></TD>
</TR>
<TR>
<TD>4</TD>
<TD>6</TD>
<TD><FONT color="#000080">10</FONT></TD>
</TR>
<% Next %>
</TABLE>
Søg
Alle emner
Teknologi
Udvikling
ASP
Indstillinger
Spørgsmål
Tips
Usenet
Reklame
Statistik
Spørgsmål :
177551
Tips :
31968
Nyheder :
719565
Indlæg :
6408836
Brugere :
218887
Månedens bedste
Årets bedste
Sidste års bedste
Copyright © 2000-2024 kandu.dk. Alle rettigheder forbeholdes.