Re: how to open .doc within vb.net?



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


.



Relevant Pages

  • RE: Built in function errors.
    ... located on other tabs in a tab control. ... I had to find a way to use the reference. ... TLBs on the client computer. ... reselect libraries simply makes the application not worth building using ...
    (microsoft.public.access.modulesdaovba)
  • Re: Reference forms and fields with variables
    ... There are so many ambiguities here, that it may not really help to follow ... If Field2 is a field in the underlying recordset, ... but the reference is unstable. ... LinkChildFields property of a subform is NOT represented by a control in the ...
    (microsoft.public.access.formscoding)
  • RE: f7s4r4v
    ... speaking this is a reference to the current instance of the class, ... Similarly any references to a control on the form simply by the ... Private Sub Form_AfterUpdate ... intSecond As Integer) ...
    (microsoft.public.access.gettingstarted)
  • Re: Referencing problem
    ... Re:> Activecontrol does not return the correct reference for controls ... Dim ctlSpell As Control ... If TypeOf ctlSpell Is TextBox Then ... If the tab is on a subform, ...
    (comp.databases.ms-access)
  • Re: How to force a page to be into a frame?
    ... >> suggesting that someone needs permission to reference a particular page ... But web hosts are not known for understanding ... I have the right to control them. ... But you do *not* have the right to control someone else's reference to ...
    (comp.infosystems.www.authoring.html)

Loading