-
htlm page to.... doc or txt file
Can anyone help me - is the following idea do-able?
I have been asked to insert a button onto our company website that allows
the user to click a button and the current record from an asp page will be
saved into a usable text file or word document.
All they are after is the text - no html codes. Imagine the screen u are
view inserted into such a file.
Is that possible? does anyone have any suggestions or places i can look for
utilities do do such a task?
Your comments will be much appreciated - even if I have to go back to them
and say its impossible because of reasons a,b,c...
Many thanks in advance
-
Re: htlm page to.... doc or txt file
Thanks Kris thats great!
Is there some similar contenttype for a text file?
"Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
>Try adding these to the top of the ASP page that displays the current
>record on-screen:
><%
>Response.ContentType ="Application/vnd.ms-word"
>Response.AddHeader "Content-Disposition","inline;filename=myWord.doc"
>%>
>The page will open in Word, pretty much as if you opened the same page
>in the browser (you may have to play with the formatting a bit).
>
>"Smart" <martinlewis@lloydjames.com> wrote in message
>news:3da2dbf6$1@10.1.10.29...
>>
>> Can anyone help me - is the following idea do-able?
>>
>> I have been asked to insert a button onto our company website that
>allows
>> the user to click a button and the current record from an asp page
>will be
>> saved into a usable text file or word document.
>>
>> All they are after is the text - no html codes. Imagine the screen u
>are
>> view inserted into such a file.
>>
>> Is that possible? does anyone have any suggestions or places i can
>look for
>> utilities do do such a task?
>>
>> Your comments will be much appreciated - even if I have to go back to
>them
>> and say its impossible because of reasons a,b,c...
>>
>> Many thanks in advance
>
>
-
Re: htlm page to.... doc or txt file
Try adding these to the top of the ASP page that displays the current
record on-screen:
<%
Response.ContentType ="Application/vnd.ms-word"
Response.AddHeader "Content-Disposition","inline;filename=myWord.doc"
%>
The page will open in Word, pretty much as if you opened the same page
in the browser (you may have to play with the formatting a bit).
"Smart" <martinlewis@lloydjames.com> wrote in message
news:3da2dbf6$1@10.1.10.29...
>
> Can anyone help me - is the following idea do-able?
>
> I have been asked to insert a button onto our company website that
allows
> the user to click a button and the current record from an asp page
will be
> saved into a usable text file or word document.
>
> All they are after is the text - no html codes. Imagine the screen u
are
> view inserted into such a file.
>
> Is that possible? does anyone have any suggestions or places i can
look for
> utilities do do such a task?
>
> Your comments will be much appreciated - even if I have to go back to
them
> and say its impossible because of reasons a,b,c...
>
> Many thanks in advance
-
Re: htlm page to.... doc or txt file
Sorry, the only ones I know about are the Microsoft ones listed below.
Apparently they'll be listed somewhere in the HTML specs, so try w3c.org
for more help.
Response.ContentType ="Application/vnd.ms-word"
Response.ContentType ="Application/vnd.ms-excel"
Response.ContentType ="Application/vnd.ms-powerpoint"
"Smart" <martinlewis@lloydjames.com> wrote in message
news:3da2f01e$1@10.1.10.29...
>
> Thanks Kris thats great!
>
> Is there some similar contenttype for a text file?
>
>
>
> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
> >Try adding these to the top of the ASP page that displays the current
> >record on-screen:
> ><%
> >Response.ContentType ="Application/vnd.ms-word"
> >Response.AddHeader "Content-Disposition","inline;filename=myWord.doc"
> >%>
> >The page will open in Word, pretty much as if you opened the same
page
> >in the browser (you may have to play with the formatting a bit).
> >
> >"Smart" <martinlewis@lloydjames.com> wrote in message
> >news:3da2dbf6$1@10.1.10.29...
> >>
> >> Can anyone help me - is the following idea do-able?
> >>
> >> I have been asked to insert a button onto our company website that
> >allows
> >> the user to click a button and the current record from an asp page
> >will be
> >> saved into a usable text file or word document.
> >>
> >> All they are after is the text - no html codes. Imagine the screen
u
> >are
> >> view inserted into such a file.
> >>
> >> Is that possible? does anyone have any suggestions or places i can
> >look for
> >> utilities do do such a task?
> >>
> >> Your comments will be much appreciated - even if I have to go back
to
> >them
> >> and say its impossible because of reasons a,b,c...
> >>
> >> Many thanks in advance
> >
> >
>
-
Re: htlm page to.... doc or txt file
Yep, look into MIME types.
"Smart" <martinlewis@lloydjames.com> wrote:
>
>Thanks Kris thats great!
>
>Is there some similar contenttype for a text file?
>
>
>
>"Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
>>Try adding these to the top of the ASP page that displays the current
>>record on-screen:
>><%
>>Response.ContentType ="Application/vnd.ms-word"
>>Response.AddHeader "Content-Disposition","inline;filename=myWord.doc"
>>%>
>>The page will open in Word, pretty much as if you opened the same page
>>in the browser (you may have to play with the formatting a bit).
>>
>>"Smart" <martinlewis@lloydjames.com> wrote in message
>>news:3da2dbf6$1@10.1.10.29...
>>>
>>> Can anyone help me - is the following idea do-able?
>>>
>>> I have been asked to insert a button onto our company website that
>>allows
>>> the user to click a button and the current record from an asp page
>>will be
>>> saved into a usable text file or word document.
>>>
>>> All they are after is the text - no html codes. Imagine the screen u
>>are
>>> view inserted into such a file.
>>>
>>> Is that possible? does anyone have any suggestions or places i can
>>look for
>>> utilities do do such a task?
>>>
>>> Your comments will be much appreciated - even if I have to go back to
>>them
>>> and say its impossible because of reasons a,b,c...
>>>
>>> Many thanks in advance
>>
>>
>
-
Re: htlm page to.... doc or txt file
1. {\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0 stshfbi0\deflang1033\deflangfe1033
2. \par }}
Read line 1 with ReadLine or ReadAll method and then call your record and
then ReadLine or ReadAll # 2.
Above line is RTF for word document. That is all you need to generate a word
document.
Later!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks