在webbrowser/c#.net中打开worddoc2007 [英] opening worddoc2007 inside webbrowser/c#.net
本文介绍了在webbrowser/c#.net中打开worddoc2007的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在网络浏览器中打开Word文档.当我打开word2003而不是word2007时,它可以实现.我得到一些链接说ActiveXwebbrowser将解决此问题.我也尝试过,但它不是在ActiveXwebbrowser内作为新窗口浏览器打开的.正在使用c#.net在Windows应用程序中工作.
Hi,
I need to open word document inside the webbrowser. its is acheived when i open word2003,but not word2007.i got some links saying ActiveXwebbrowser will solve this problem. i tried that also but its opening as a newwindow explorer not inside the ActiveXwebbrowser. am working in windows application using c#.net.
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
{
object null_obj_str = "";
string FileName = openFileDialog.FileName;
object loc = FileName;
System.Object null_obj = 0;
axWebBrowser1.Navigate2(ref loc, ref null_obj, ref null_obj, ref null_obj_str, ref null_obj_str);
//axWebBrowser1.Navigate(new Uri(FileName));
}
谢谢
Dev.
Thanks
Dev.
推荐答案
请仔细阅读....
直接从Microsoft Word文件读取文档文本 [ http://www.programmerfish.com/quick-tutorial -how-to-read-microsoft-word-file-in-c/ [ http://forums.asp.net/t/1747267.aspx/1 [ ^ ]
Please go through this....
Read Document Text Directly from Microsoft Word File[^]
http://www.programmerfish.com/quick-tutorial-how-to-read-microsoft-word-file-in-c/[^]
http://forums.asp.net/t/1747267.aspx/1[^]
这篇关于在webbrowser/c#.net中打开worddoc2007的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文