Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 9th, 2006, 03:52 AM
Registered User
Join Date: Nov 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to senthilavs Send a message via Yahoo to senthilavs
Default Can't able to Open Word File in Client Machine


Im having word document in the Server Machine. While im trying to open the file in Client Machine file is opening in Server only. I need to open in the client only. This is an ASP.NET project done in VB.NET.

The Code i used to Open the file
Dim oWordApplic As New Word.ApplicationClass
Dim oDoc As Word.Document
Dim strFileName As String = ConfigurationSettings.AppSettings("WordDocu") + ReportName + ".doc"
Dim missing As Object = System.Reflection.Missing.Value
oWordApplic.Visible = True
oDoc = oWordApplic.Documents.Open(strFileName, missing, False, missing, missing, missing, missing, missing, missing, missing, missing, isVisible, missing, missing, missing, missing)

Another Code I Used is Hyperlink. Just i give the link to hyperlink but its opening in readonly format. so i cant able to do any modification. Because i have to save the file in the server.

HyperLink1.Text = Name + ".doc"
HyperLink1.NavigateUrl = ConfigurationSettings.AppSettings("WordDocu") + Name + ".doc"

Another type i Checked its also opening in readonly.

Dim filename As String = ConfigurationSettings.AppSettings("WordDocu") + ReportName + ".doc"
Response.ContentType = "application/ms-word"
Response.AddHeader("ContentDisposition", "attachment;filename")

Give me the solution i need it very urgent.

Thanks in advance
Senthil V.

Old June 10th, 2006, 01:02 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post

All of you code will run on the server as you are running it SERVER SIDE, if you want to run it on the local users machine, assuming that they have their browser set up to allow that then you will need to do it CLIENT side.

For some samples have a look at http://www.greggriffiths.org/webdev/both/excel/

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving DataSet data on client machine in .csv file balesh ASP.NET 1.0 and 1.1 Professional 0 October 25th, 2006 06:17 AM
Saving file on client machine balesh ASP.NET 1.0 and 1.1 Professional 1 September 18th, 2006 07:49 AM
wirting file to web client machine from webserver paranthaman .NET Framework 2.0 0 February 25th, 2006 01:44 AM
save a file on client machine sumsin ASP.NET 1.0 and 1.1 Basics 1 March 30th, 2005 05:52 PM
Cannot open Word Document At Client Side leo_ling Classic ASP Basics 6 July 1st, 2004 12:31 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.