11
Answers

Opening worddoc2007 inside webbrowser/c#.net

Deva Subbu

Deva Subbu

9y
9.8k
1



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)); }


Answers (11)