Force Word Doc To Open In Browser
has anyone got a way to force a word doc to open in a browser (it's for an intranet site before anyone asks), I can force the download, but I don't know a way to force the browser to open it.
View Replieshas anyone got a way to force a word doc to open in a browser (it's for an intranet site before anyone asks), I can force the download, but I don't know a way to force the browser to open it.
View RepliesHow do I force a pdf to be downloaded rather than opened in a browser window?
I've got the code below, which seems to work in Firefox, but in IE7 it spits out a huge page of wierd characters:
<%
Response.ContentType = "application/pdf"
FPath = server.mappath("pdf/portfolio.pdf")
Response.AddHeader "Content-Disposition","attachment; filename=" & FPath
Set adoStream = CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(FPath)
Response.BinaryWrite adoStream.Read()
adoStream.Close
Set adoStream = Nothing
Response.End
%>
I have 2 .ascx files and one .htm file. One of the .ascx files is basically just a table with four rows. One of the rows has table for the other .ascx file, which is the menu, and the .htm file, which is the body content. Code:
View Replies View Relatedwhen i open new browser using this code, cant find session.
<a href="newwindow.asp" target="_blank">open</a>
session is null when i try display in new browser.cant pass session to new browser link?
This link will take him to another page where I enter the email address of my friend. As soon as I submit this form Iam passing some parameters that will go along with my url which is however an IP address. When my friend receives the email in his hotmail account he is provided with my url address. When he clicks the url address my site opens as a frame in msn hotmail . When he gives the information a page is presented with the error message "404 -File cannot be found".
So when the URL address is clicked I need the form to be opened in a separate browser.
I am using ASP + HTML + MS SQL 2000 to generate a report which in excel
format.
Of course, I just make the contenttype = "application/vnd.ms-excel"
One of my client using window XP professional with SP2
when he tried to export that report, the report just open a while (within
1-2s) and then close itself automatically.
I have tried to export other report, which also in excel format, from other
webbased system, but it sees have not any problem, it can open correct...
And I have checked both file are using the same technologies (set
contenttype, using asp, html and mssql 2000)
Can you tell me what problems it have?
Is there a way to keep an other application from opening a link in a
browser where I am running an ASP application?
For example, I have an ASP application open in a browser. If I click on
a link in an email message, Outlook "hijacks" the open browser and
opens opens the link in it. Is there a way to prevent this? To somehow
identifiy that browser window as "off limits" to another app?
I have a asp web page with a link point to a file which depend on the database information. Sometime is a picture file sometime a word and some time is a PDF file.
For picture file, when user click the link, it will open the picture inside the IE browser. Now here is my problem:
On some of the computers, for PDF file only, it opens outside of the IE browser. Like the Acrobat program is not in the browser. With the same code, some computer works good. But I want to force it open inside the browser. why and how to fix it?
I have a Word doc already created that I want to open from an asp page. I want it to open in Word and allow the user to modify if necessary. I currently have it opening (using href), but it is opening in IE. I think I should be able to do it with javascript to open word and then call that function on the link to the doc. Can someone give me some pointers?
View Replies View RelatedI got the following code from a website somewhere. When I try to run it I
get the error - Activex component can't create object "Word.Application".
It is running on localhost and test2.doc does exist. Code:
It looks like that when the window.open call is made, and a new window is
created - my users lose all the information they entered - if they navigate
backwards then forwards. If the second window was already created...
navigating backwards and immediately forwards, seem to behave 'normally'
(i.e. all their previous inputs are there on the screen.).
Is this normal? Is there some way to kick-off a new window without losing
the inputs previously entered at an earlier screen? There was an earlier
post about losing session info when opening a window - is this a similar
situation?
I suppose I don't really have to have two windows opened at the same time -
using a simple anchor link seems to work without the side-effect. It's just
not as snazzy and the work-flow is slightly more stilted.
While I've been toying around with some other work-arounds - I was wondering
if anyone else has ever run into this situation? Or am I missing some
critical piece of info?
I've stripped it down to the 'barest-of bones' so that anyone willing to help can duplicate the problem on their own systems. Code:
View Replies View RelatedI'm using ASP to pull info from a database and open it in Word. Everything works fine but I want to specify the paper size to be Legal. Is this possible or am I stuck with Letter size?
View Replies View Relatedis it possible to open word or excel from an asp page in the client side having word or excel installed only on the server side?if possible, can u post an example ?
View Replies View RelatedI want to open a word document in asp.(if possible with FSO)(I don't want to create a word with asp!)
View Replies View RelatedIs it possible to create a code that will open a word document and print it? I need to to this for various documents within the same form. That is I need to print from 1 to 5 documents each time the code is executed.
View Replies View RelatedI want to read word files from asp and then store the read data into a variable. How can this be done ? I have no idea on opening files from MS Word.
View Replies View RelatedHow can open a Microsoft Word file by ASP?
View Replies View RelatedI have a page that links users to a Word document based on a value drawn from a database table. In other words, John Doe is linked to "./docs/<% = lastname%>.doc" ...
This works fine, but I'm wondering if there's a way to control whether the doc opens read-only? I know Office 2003 docs are supposed to open read-only automatically, but I find that I can edit these docs no problem.
I have a Word doc already created that I want to open from an asp page. I want it to open in Word and allow the user to modify if necessary. I currently have it opening (using href), but it is opening in IE. I think I should be able to do it with javascript to open word and then call that function on the link to the doc.
View Replies View RelatedI want to open word file (or Excel) from IIS server (URL) without
getting security window for input Username and password. I know
Username, Password and Domain. I'm trying to open with:
http://domain%5cUsername:password@URL
When my computer is registred in this domain - no problem. But if my
computer is not from this domain I always get window for input
Username, Password and Domain.
I have a table in a plain asp page. At the top I have
Response.Contentype = "application/vnd.ms-word"
When it opens in word, it opens in a funky view. Is there anyway to have it
open in Normal View mode?
In my application I am using Word to hold data out of a MS SQL Server 2000 database. On the clients PC's I am getting a open/save pop up dialog for opening MS- Word. How can I disable this pop- up and load Word without having this dialog? The clients pc are Windows XP/SP2 machines.
View Replies View Relatedhow to open word document met bookmark image. I like to open a word document with an image. here is my code
<%
Dim MyDoc
dim objWord
Set objWord = CreateObject("Word.Application")
Set MyDoc = CreateObject("Word.Document")
MyDoc.Application.Visible = True
'Set the font properties
MyDoc.content.Font.Bold = True
MyDoc.content.Font.Italic = True
MyDoc.content.Font.Underline = True
MyDoc.content.Font.Name = "Comic Sans MS"
MyDoc.content.Font.Size = 25
Set MyDoc = Nothing
%>
How would this be done for something like a text editor?
For example, say I wanted to launch a text editor from a hyperlink AND also the file I wanted to open with the editor as as well?
anyone know how to open in ASP a word .doc stored in an access database.
1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page.
2.This '.tif' type image can be shown better with 'Kodak Image Control'.
3.To have this 'Kodak Image Control' on my code page I just add it's ..ocx to tool box and then drag it from 'Toolbox' to the page.
4.Now after dropping this control to the code it's type is getting changed to 'object' instead of type 'ImgEdit'(and I think this is the
reason I don't get correct result).
5.On one button's 'Onclick' event I'm calling a javascript function with which I'm setting a 'Path'and'Display' property of a control.
6.And want to show a image at location -- '..MFTDRCMF919685173-62.tif' which get shown in new browser window but could not get shown in that particular control. That means the path is correct, then what is the problem?
For better understanding of problem I'm pasting a following code which I've tried up till now......
..................................................
<%@ Language=VBScript %>
<% OPTION EXPLICIT %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT LANGUAGE=javascript>
<!--
function showpic()
{
var path;
path = document.frmtif.path.value;
alert(path);
document.frmtif.ImgEdit1.Image =path;
document.frmtif.ImgEdit1.Display;
window.parent.self.open(path);
}
//-->
</script>
</HEAD>
<BODY bgColor=#ffe4e1>
<form name="frmtif">
The Image
<P>
<OBJECT id=ImgEdit1 style="WIDTH: 409px; HEIGHT: 218px" type="ImgEdit"
align=left
border=1 classid=clsid:6D940280-9F11-11CE-83FD-02608C3EC08A
name=imgtif></OBJECT>
<input type="hidden" name="path"
value="..MFTDRCMF919685173-62.tif">
<input type="button" name="show" value="Show" onclick="showpic();">
</P>
</form>
</BODY>
</HTML>
..................................................
My main page shows a table to which a user can add data to by clicking on a button, this in turn loads up a pop up window where the data to be entered is typed. Once the data is submitted the popup window is closed via Close button, but the table on the main IE page only shows the updated information if the refresh button is clicked.
All i want to know is, is there a way of forcing refresh of the main page when the close button in the popup window is clicked. Code used for the close button:
<TD><a href="javascript:self.close()" title="Close"><IMG align="center" src="http://localhost/***/close.gif" alt="Close Window"></a></TD>
I need to find a way to force all the asp code on a web page to load
regardless if the user hits the reload or stop button on the browser.
I am seeing where more and more users are doing this and it is causing
me some problems on some pages. I would guess there is a way to do
this I am just searching for the wrong thing?
I got my excel doc to export but it has a white background, can i export it with with out the background and show the grid like a normal file
View Replies View Relatedhow would i for a browser to download a file (specifically mpgs) i can get it to go for small 4mb files, but the larger ones if they do go, take bout 15 mins to even begin the download.
View Replies View RelatedI'm trying to create mp3 downloader and force download instead open in explorer. it's ok if the song is at my server but what if songs are at another server. I try to split full path to file path and file name but doesn't work. Script don't work if is song at my server and path to song start with http://www...
View Replies View RelatedEvery time my page loads in IE6 the navigation reloads. How do I stop this happening? It works fine in FireFox.
I do have <% response.expires = -1 %> at the top of my page. Would this affect the navigation graphics as well?Can I force a user's browser to cache the nav?