am using the following to open a Word document on the client side:
function launchWord(strFile)
{
var oWord = new ActiveXObject("Word.Application");
if (oWord != null)
{
oWord.Visible = true;
oWord.Documents.Open(strFile);
}
}
This works fine when I have strFile set to something like "C:\\test.doc" But when I try to set it to the root of the web page with just "\test.doc" or in the same folder that the asp page is in with "test.doc", it says file not found. How do I set the location to be the same folder where the asp page is in?
Also, how do I set focus to the Word document? Right now it is coming up behind the asp page.
Thanks!
function launchWord(strFile)
{
var oWord = new ActiveXObject("Word.Application");
if (oWord != null)
{
oWord.Visible = true;
oWord.Documents.Open(strFile);
}
}
This works fine when I have strFile set to something like "C:\\test.doc" But when I try to set it to the root of the web page with just "\test.doc" or in the same folder that the asp page is in with "test.doc", it says file not found. How do I set the location to be the same folder where the asp page is in?
Also, how do I set focus to the Word document? Right now it is coming up behind the asp page.
Thanks!