Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Web Browser control and open a MSWORD document inside the IE frame


Web Browser control and open a MSWORD document inside the IE frame

Author
Message
sona123
sona123
Forum God
Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)

Group: Forum Members
Posts: 2, Visits: 7
Hello everyone!

I am very new to VB .net and windows programmig, but over a few days have read a few articles. Hence I 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.

Any suggestions are valuable. Thanks!

sona123
sona123
Forum God
Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)Forum God (588 reputation)

Group: Forum Members
Posts: 2, Visits: 7
Hello,

I got it working, so sharing with you guys.

The problem was I never created an Interface which would be exposed to external programs. My VB .NET class implements this interface. All the methods, attributes which would be needed by the external program should be defined in the interface and implemented in the class accordingly. The classid of the interface can be used directly in the javascript code to invoke my activex object. Also, the class needs to be made COM visible.

It would have been very simple to implement what I needed, if I had some clear understanding of VB .net programming! Nonetheless, I implemented it anyways (pheeww)

Hope this would be helpful to others.

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search