Results 1 to 2 of 2

Thread: Web Browser control and open/edit a MSWORD document

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2009
    Posts
    4

    Question Web Browser control and open/edit a MSWORD document

    I am very new to VB .net and windows programmig, but over a few days have read a few articles. But I really need some help from you guys!

    I am trying to create a DLL file which would be called from a HTML using javascript. I am using a COM class in my VB .NET application. It is COM visible and members along with Functions are set COM visible.

    The idea is to use the Web Browser control and open a MSWORD document inside the IE frame. I am struggling a lot with this. If there are any experts out there, can they please share the steps I need to perform to do this. Here is what I have done so far with no success.

    1) Created a VB .net project with a COMClass. Com visibility is set true for most of the memebers and functions.

    2) Added reference to System.windows.forms to get hold of the usercontrol and web browser (here i am trying to create the UI to hold the web browser control) I try to set all this in the New() i.e contructor of the class.

    3) Added a reference to Interop.Word so that I can cast the document given by the webbrowser control to a MSWORD instance and access its properties.

    My projects builds without any problems. But in the javascript, it throws error when I try to access the DLL files members or function. I am lost and wonder if I can make it work. Do you see any fundamental problems with what I am trying to do?

    Any suggestions are valuable. Thanks!

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Web Browser control and open/edit a MSWORD document

    possibly you would get more help in the vb.net forum, i certainly can not help you at all, i suggest you pm a mod to move the thread
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width