Re: how to open .doc within vb.net?
- From: "CMoya" <moy@xxxxxxxxxx>
- Date: Fri, 4 Jan 2008 04:24:34 -0500
If you don't want to use zack's suggestion of hosting MS Word as a container, you can maybe get a little creative and "translate" the document using Word itself behind the scenes. Word exposes a nice automation object model. Add a reference to the Word object library (References -> Add -> COM -> Microsoft Word 12 Object Library). Create an instance of the Word COM object (Word.Application). Open the document. Save it As RTF or HTML in the temp directory and then load it up in the RichTextBox or Webbrowser control. This can all be done behind the scenes.
If you're worried about binding to a version of Word the user may or may not have (Version 12 in this case), you can turn off Option Strict, remove the "Reference" mentioned above, and automate the Word.Application object that way. Word's object model is largely backwards compatible and doesn't change a whole lot between versions.
I dunno. Just food for thought.
"jabslim via DotNetMonster.com" <u40064@uwe> wrote in message news:7daf1c44bb347@xxxxxx
ive already seen and tried that, but it open the whole MS WORD inside the web
browser control. all i want is to view the file without the MS WORD's menu
bar, etc... and i want to make it only viewable, not editable.(i use msword
2007)
zacks@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
Here is a link that may be useful to you. BTW, this was the second
link in a Google search for "microsoft word control for .net". Google
is your friend.
http://support.microsoft.com/kb/304643
--
Message posted via http://www.dotnetmonster.com
.
- References:
- how to open .doc within vb.net?
- From: jabslim via DotNetMonster.com
- Re: how to open .doc within vb.net?
- From: zacks
- Re: how to open .doc within vb.net?
- From: jabslim via DotNetMonster.com
- how to open .doc within vb.net?
- Prev by Date: Keydown event
- Next by Date: Re: Keydown event
- Previous by thread: Re: how to open .doc within vb.net?
- Next by thread: Re: how to open .doc within vb.net?
- Index(es):
Relevant Pages
|
Loading