我想在客户端打开本地的word文件,但是我把文件上传给服务器后文件在服务器端打开了,我怎么才能在本地打开本地word文件呢??????/
代码:
string filePath="";
string ls_wjmc="";

if("" != fileUp.PostedFile.FileName)
{
filePath =fileUp.PostedFile.FileName;//取得文件路径
string ls_doc= filePath.Substring(filePath.LastIndexOf(".")+1);
string mFileName=filePath.Substring(filePath.LastIndexOf("\\")+1);;
if(ls_doc!="doc")
{
Response.Write("<script language='JavaScript'>alert('您未选取具体的word表,请返回重新选择。')</script>");
}
ls_wjmc=mFileName.Substring(0,mFileName.Length-4);
}

//打开:
Object oMissing = System.Reflection.Missing.Value;
Word.Application Word_App=new Word.Application();
Word.Document Word_doc=new Word.Document();
Word.Documents Docs = Word_App.Documents;
Word._Document my_Doc= (Word._Document) Word_doc;
object FileName=filePath;
if(Word_App.Version=="9.0")
{
Word_doc=Docs.Open(ref FileName,ref oMissing, ref oMissing, ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing);
}
if(Word_App.Version=="11.0")
{
// Word_doc=Docs.Open(ref FileName,ref oMissing, ref oMissing, ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing);
}

Word_App.Visible=true; object Nothing=System.Reflection.Missing.Value;