Opening Word Documents

D

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top