Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 9th, 2006, 03:52 AM
Registered User
 
Join Date: Nov 2005
Location: Chennai, Tamil Nadu, India.
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

Hi,

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)
oDoc.Activate()
----------------------------------------------------------------

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")
Response.WriteFile(filename)

Give me the solution i need it very urgent.

Thanks in advance
Senthil V.

Reply With Quote
  #2 (permalink)  
Old June 10th, 2006, 01:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

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/
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:11 PM.


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