View a WinWord Doc in a WinForm

  • Thread starter Thread starter John Mark Howell
  • Start date Start date
J

John Mark Howell

Does anyone know how I could view a WinWord Doc in a WinForm (other than
convert to RTF or HTML)? I cannot convert it to RTF because I have drawn
lines and they will not come through when converted to RTF. I would rather
not convert to HTML because of the ease in changing the format (doc will
change).
 
John,

If you host the webbrowser control, and call the Navigate method on it,
passing a path to the Word document, then it will use Word in the web
browser control to display it.

Also, in the next release of .NET, there will be an Active Document Host
control, which you can use to show word documents, excel documents, etc,
etc.

Hope this helps.
 
It does help some and I greatly appreciate the tip. However, there are a
couple of drawbacks. First, the time it takes to load (or refresh if the
doc changes); second, the WinWord document view is whatever the user has set
(ex. if the user has zoom level 200, the doc window will automatically zoom
to that level).

On the new Active Document Host Control, will we be able to minipulate the
hosted document or is it view only? Will it be able to sense changes in the
stored document and refresh automatically? And finally, when would we even
be able to begin to expect it?

TIA.


Nicholas Paldino said:
John,

If you host the webbrowser control, and call the Navigate method on it,
passing a path to the Word document, then it will use Word in the web
browser control to display it.

Also, in the next release of .NET, there will be an Active Document Host
control, which you can use to show word documents, excel documents, etc,
etc.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

John Mark Howell said:
Does anyone know how I could view a WinWord Doc in a WinForm (other than
convert to RTF or HTML)? I cannot convert it to RTF because I have drawn
lines and they will not come through when converted to RTF. I would rather
not convert to HTML because of the ease in changing the format (doc will
change).
 
John,

You could expect it in the next release of .NET, which is at least six
months away (it's not called VS.NET 2005 for nothing, hehe).

As for the questions about the host control, I think you will be able to
edit it as well. I don't know about the refresh capabilities (that would be
a problem if you have edits in it already).


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

John Mark Howell said:
It does help some and I greatly appreciate the tip. However, there are a
couple of drawbacks. First, the time it takes to load (or refresh if the
doc changes); second, the WinWord document view is whatever the user has set
(ex. if the user has zoom level 200, the doc window will automatically zoom
to that level).

On the new Active Document Host Control, will we be able to minipulate the
hosted document or is it view only? Will it be able to sense changes in the
stored document and refresh automatically? And finally, when would we even
be able to begin to expect it?

TIA.


message news:[email protected]...
John,

If you host the webbrowser control, and call the Navigate method on it,
passing a path to the Word document, then it will use Word in the web
browser control to display it.

Also, in the next release of .NET, there will be an Active Document Host
control, which you can use to show word documents, excel documents, etc,
etc.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

John Mark Howell said:
Does anyone know how I could view a WinWord Doc in a WinForm (other than
convert to RTF or HTML)? I cannot convert it to RTF because I have drawn
lines and they will not come through when converted to RTF. I would rather
not convert to HTML because of the ease in changing the format (doc will
change).
 
Back
Top