473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Opening Word Documents

dew
How do I open a word document programmatically from a button, (1) with no
Word prompts such as Save As, and (2) have it jump to a bookmark.

I have tried two ways: at the btnShowDocument_click event, I do the
following. This doesn't work at all, the document doesn't open, and I get a
prompt that says "This document contains one or more links to other files.
Do you want to update this document with the data from the linked files?" I
do have linked files, but I don't want the users to have to deal with that.

Try
Response.ContentType = "Application/msword"
Response.WriteFile("Help.doc")
Catch
Response.ContentType = "text/HTML"
Response.Write("Document not found")
Finally
Response.End()
End Try

The second way is from a menu, with the script
Script="window.open('Help.doc')"
ClientScripts="onclick:window.open('Help.doc'). This one at least opens the
document, but it still prompts them to update the links, and every time they
click on a link in the table of contents, it asks them if they want to save
changes -- what's that all about. And of course when they close it again
asks them if they want to save changes. I don't want all these prompts.

Thanks very much for your help.
Feb 7 '06 #1
0 1061

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Fazer | last post by:
Here comes another small question from me :-) I am curious as to how I should approach this issue. I would just want to parse simple text and maybe perhaps tables in the future. Would I have to...
3
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge...
0
by: Maheshwari | last post by:
Hi Can you please help with some info on how to open existing word documents / merge two word documents from a C# program ? My user will select 2 or many word docs and i have to create a c# exe...
4
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone...
3
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone...
3
by: richi | last post by:
Hello, i'm hoping that somebody can point me in the right direction with my problem. I have been tasked with creating a simple browser based application that will allow the user to upload Word...
4
by: Charlie Brookhart | last post by:
I am trying to write a code for a button click event. When the button is clicked, it is supposed to bring up an open file dialog box to allow the user to select the document they which to open....
2
by: Colin Halliday | last post by:
I have a Word 2003 mail merge main document (form letter) that is linked to another Word document data source for the mail merge. If I open this doc using the Word GUI, it first asks me to...
1
by: Imtiaz Qamar | last post by:
How can a password be provided to any password protected document while opening in an OLE object?
4
by: Willis Wilson | last post by:
Platform: Access 2003 SP2 and Windows XP. I've tried a number of different scenarios and none of them seem to work The "OpenDataSource" statement gives a Run-time error 5922. Please help find...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.